PDA

View Full Version : Image support in dynamic menu?



The Dark Lord
04-07-2005, 10:12 AM
Script: Dynamic-Fx Slide-In Menu
http://www.dynamicdrive.com/dynamicindex1/davidmenu.htm

This is a very slick and professional looking script but there's something bugging me.
There is a comment in the "ssmItems" file that states you may use an image for the bar instead of text, (bar being the part that is permanently visible on the page before mouseover).

The comment states: <IMG> tag supported. Put exact html for an image to show.

I've had a go at this but have been unable to achieve anything with it other than script error messages. Can anyone tell me what is meant by "exact html" in this instance?
I'm not a complete novice to all this but as you can probably tell I'm certainly no expert either.

Many thanks.

Rob

jscheuer1
04-07-2005, 10:26 AM
I assume this:

barText="SIDE MENU"; // <IMG> tag supported. Put exact html for an image to show.is what you are referring to. Common sense would tell you the image cannot be too big, too wide or too tall. Uncommon sense, er some knowledge of JavaScript would tell you that this is a double quote delimited string:
"SIDE MENU"and can be replaced with HTML code. The beginning and ending quotes must remain and any double quotes contained in the HTML code you put in there must be escaped. Example:


barText="<img src=\"some.gif\" width=\"10\" height=\"60\">"; // <IMG> tag supported. Put exact html for an image to show.

The Dark Lord
04-07-2005, 10:34 AM
Wow!
That was a swift response.
Well spotted, I have only just started to learn about Javascript and am probably trying to run before I've learnt to walk.
Many thanks for your help.

The Dark Lord
04-07-2005, 11:10 AM
Tried that but it didn't like it any better.
Thanks anyway.

jscheuer1
04-07-2005, 03:40 PM
OK, I just tested it out, and in addition to my previous comments, it appears that the img in the image tag must be capitalized:

<IMG

not:

<img

Works here.

The Dark Lord
04-08-2005, 12:43 PM
I suppose the fact that it is capitalised in the author's comment should have given it away, but to be honest I wouldn't have spotted that in a million years.

I'm much obliged, thanks for taking the time to look into this for me. (IOU a pint)

cheers,

Rob