SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting Javascript to validate

    Hi,

    I am using a light window script on my site. It is based on Prototype framework. When I look at the validation, it says that lightwindow_navigation_shm has an error. I'm not a JS guru by any means. More of a plug and play type designer. The original coder for this light box has moved on. Can someone tell me where the bug is?
    The script works perfectly, I'd just like to get it validating.
    Warehouse Facilities, Salt & Sand Storage, Riding Arenas, Livestock Housing, Construction Storage, Athletic Buildings - ClearSpan Tension Fabric Structures

    thanks

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,600
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Assuming that you are using the JavaScript validator at JSLint,The JavaScript Code Quality Tool and have the "Assume A Browser" checkbox checked and all the others unchecked - exactly what error messages is it giving as that should tell you exactly where in the script to find the code that potentially has problems.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Assuming that it's one of the videos that the problem is happening on, the error message I get for that is:

    Code:
    Unsafe JavaScript attempt to access frame with URL http://www.clearspan.com/fabric/structures/home
    from frame with URL http://www.youtube.com/embed/LmEAAM9e0Cs.
    Domains, protocols and ports must match.
    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 2011
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Paul. Yes, those two little videos at the bottom right display a youtube video within the lightbox. This is how it works so I don't know why the error would say that.
    Weird

  5. #5
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by ccamacho View Post
    Thanks Paul. Yes, those two little videos at the bottom right display a youtube video within the lightbox. This is how it works so I don't know why the error would say that.
    Weird
    What it's saying is that Youtube is being naughty and is trying to access your own page. The web browser is saying that it caught the naughty attempt and stopped it from happening.

    Good web browser *pat pat*. You get a virtual chocolate fish for such good behaviour.
    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 2011
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol
    Nice!

    So nothing wrong with the code itself then.
    That's a relief


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
  •