Results 1 to 6 of 6

Thread: Image support in dynamic menu?

  1. #1
    Join Date
    Apr 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Image support in dynamic menu?

    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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I assume this:
    Code:
    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:
    Code:
    "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:

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

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Apr 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  4. #4
    Join Date
    Apr 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Tried that but it didn't like it any better.
    Thanks anyway.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Apr 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •