- From: Jerry <dogpatch@bmi.net>
- Date: Mon, 26 Jan 2009 21:09:35 -0600
- To: www-validator@w3.org
Re. the <noscript> message of a few minutes ago - the page now passes the validator OK. But the 'solution' strikes me as odd. What i am trying to do is vary some text within a message based upon whether javascript is enabled. This message is made bold with a <b> tag. The validator apparently didn't like a <noscript> tag embedded between the <b> and the </b>. So, i had to add a close tag </b> before the <noscript> tag, then add both <b> and </b> to the text within the <noscript> block. But the validator wouldn't let me do the same for the text within the <script> block, since it can't recognize the opening <b> tag, and then complains that the closing </b> tag has no corresponding open tag. So, my only recourse was to include a closing </b> tag between the script and noscript blocks, like this: ----------------------------- <b>Some bold message text varying depending upon whether <script language="JavaScript" type="text/javascript"> document.write("Javascript is enabled"); </script> <!-- Squirrelly fix here --> </b> <noscript> <b>Javascript is not enabled</b> </noscript> <b> on the client machine. Now, close the bold text.</b> ----------------------------- Confused? I think i am. This doesn't look like proper markup, but i have no idea how else to do it. pax et bonum, Jerry
Received on Tuesday, 27 January 2009 07:30:18 UTC