Print Page | Close Window

W3C Markup Validator Problems

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart Build To Order
Forum Name: Customizing BTO
Forum Description: Interact with other users, resellers and developers about customizing BTO
URL: https://forum.productcart.com/forum_posts.asp?TID=5385
Printed Date: 23-November-2024 at 7:09am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: W3C Markup Validator Problems
Posted By: Brett
Subject: W3C Markup Validator Problems
Date Posted: 26-December-2012 at 9:45pm
I'm trying to validate all of our store pages (ProductCart v4.1b SP 2) with the WC3 validator. I was able to complete validation on our home page, but am having trouble with the product configuration page. I tried to tell my boss that this validation stuff isn't important and it really is validated since these errors are within the javascript code, but he won't accept that as an answer. So I'm left trying to figure out how to fix this validation error.

You can see the validator page here: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.liftchair.com%2FInfinite-Position-Full-Sleeper-Lift-Chair-Deluxe-Option-Package-11p720.htm&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3" rel="nofollow - http://validator.w3.org/check?uri=http%3A%2F%2Fwww.liftchair.com%2FInfinite-Position-Full-Sleeper-Lift-Chair-Deluxe-Option-Package-11p720.htm&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3

And the first error is as follows:

Line 704, Column 20: end tag for "SCRIPT" omitted, but its declaration does not permit this
          doc.write('</form>');

You forgot to close a tag, or
you used something inside this tag that was not allowed, and the validator is complaining that the tag should be closed before such content can be allowed.
The next message, "start tag was here" points to the particular instance of the tag in question); the positional indicator points to where the validator expected you to close the tag.


Which happens to be this line, around 704 on the rendered page, and existing within pcWindowsViewPrd.asp on line 49:

          doc.write('<input name="pcv_strCurrentUrl" type="hidden" value="' + pcv_jspCurrentUrl + '" \/>');          
          doc.write('<\/td><\/tr><tr><td align="center">' + "Loading Product Images... If the images do not appear in 15 seconds <input type='submit' name='Submit2' value='Click Here' id='submit2' class='submit2'>." + '<\/td><\/tr><\/table>');
          doc.write('</form>');
          doc.write('</div>');


The validator says the script tag is not closed, but it is definitely closed further down the page on pcWindowsViewPrd.asp, so I'm wondering if there might be something else causing this error.

Has anyone else managed to validate all of the ProductCart pages? If so, how did you deal with this error?



Replies:
Posted By: Guests
Date Posted: 02-January-2013 at 5:07pm
Hi Brett,

I see that a couple of forward slashes were not escaped in the JS here. Try correcting this first and see if you get better results:

doc.write('<\/form>');
doc.write('<\/div>');



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net