Results 1 to 2 of 2

Thread: Floating Menu Script Problem

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

    Default Floating Menu Script Problem

    I am having trouble getting this script to work:
    http://www.dynamicdrive.com/dynamici...staticmenu.htm

    I get the image I am using for a imagemap menu to show but it doesn't move as you scroll.

    However, the real problem is I would like to get this to work from a .XSL file. I inserted the code as directed just before the </body> tag and it causes a XML failure saying the </script> tag is coming before and ending tag for <div>.

    Any assistance would be appreciated.

    Ken

  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'd have to see your page to help with the first problem. The second problem, I think you may have explained incorrectly. It is perhaps more likely that the </script> tag comes after a closing </div>. However, the way you explained it may be the way the xml parser sees it. In any event, what you can try is to locate any closing tags inside the script (usually found in variable assignments, 'innerHTML=' statements, and 'document.write' or 'document.writeLn' statements and escape their /'s with \'s, example:

    <\/div>

    If there is an actual </script> tag inside the script as part of a variable, innerHTML, or write statement, it needs special handling but, should already have it as, that would be a problem in normal HTML as well (all except for the escaping \, highlighted red). It should be treated like so or similar (there are other workable ways):

    Code:
    document.write('<'+'\/'+'s'+'cript>')
    Also, it is a good idea to make all javascripts external for XHTML/xml.
    - John
    ________________________

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

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
  •