www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] Validation error - unterminated string literal

  1. #1
    Join Date
    Oct 2006
    Location
    Ables Springs, Texas
    Posts
    139

    resolved [RESOLVED] Validation error - unterminated string literal

    This line of code is returning a W3C validation error:
    Code:
    <a href="http://www.jwgmg.com/cf1/contactform.php" rel="nofollow" target="_blank"
    		onclick="window.open('http://www.jwgmg.com/cf1/contactform.php','Table','width=500,height=600,scrollbars=yes,
    		resizable=yes'); return false;">Contact Us</a></p>
    The error returned is:
    Bad value window.open('http://www.jwgmg.com/lib/terms.html','Table','width=500,height=600,scrollbars=yes,↩ resizable=yes'); for attribute onclick on element a: unterminated string literal
    What's the solution? The page that code is on loads and works as intended. Is this one of those validation quirks you just have to ignore?

  2. #2
    Join Date
    Nov 2010
    Posts
    1,049
    it's just the line break, as far as I can see - all you need to do is close up the space between yes, and resizable:
    Code:
    <a href="http://www.jwgmg.com/cf1/contactform.php" rel="nofollow" target="_blank" onclick="window.open('http://www.jwgmg.com/cf1/contactform.php','Table','width=500,height=600,scrollbars=yes,resizable=yes'); return false;">Contact Us</a>

  3. #3
    Join Date
    Oct 2006
    Location
    Ables Springs, Texas
    Posts
    139
    Thanks xelawho. Couldn't see the forest for the trees. No more validation error.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles