SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Apr 2008
    Location
    Melbourne
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    error in UDM style.js

    I'm trying to clean up pages that I wrote in 2002.
    Those pages have an older version of the Ultimate Dropdown Menu from Brothercake.
    It works nicely, but the developer toolbar in Firefox points to style.js as having an "invalid selector" and "no closing } for invalid rule set".
    It doesn't give me a line in the javascript file, just the line in my html that calls the script.
    I can't find any sort of validator that will look at the javascript file.
    I've tried to look at it myself, but, as I don't understand javascript, that's a pretty useless exercise.
    Could I have some advice as to what I should do, please?

  2. #2
    SitePoint Member
    Join Date
    Apr 2008
    Location
    Melbourne
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Should I post the code? It's pretty big--lots of very long lines--and I don't know which parts are irrelevant so I'd have to put it all up.

  3. #3
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,527
    Mentioned
    84 Post(s)
    Tagged
    4 Thread(s)
    It is far preferable for you to provide a link to an online version of it.
    Please do not post a large amount of code unless it is necessary.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  4. #4
    SitePoint Member
    Join Date
    Apr 2008
    Location
    Melbourne
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you. The menu is on this page:
    http://www.izone.net.au/~yarraquilt/index.html

  5. #5
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,527
    Mentioned
    84 Post(s)
    Tagged
    4 Thread(s)
    The problem is in http://www.izone.net.au/~yarraquilt/style.js

    It's creating a stylesheet but it's wrapping the stylesheet in html comments. That is invalid stylesheet syntax. Remove the "<!--" and "//-->" from the style.js file and you'll be sweet.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  6. #6
    SitePoint Member
    Join Date
    Apr 2008
    Location
    Melbourne
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, thank you so very much. I'll get to it immediately!

  7. #7
    SitePoint Member
    Join Date
    Apr 2008
    Location
    Melbourne
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, Paul, for going to the trouble of looking through it.
    I've removed the comment markers and the page I'm working on gets three green ticks from Firefox.
    I'll go now and fix it on two sites.


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
  •