<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1034180" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1034180</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-design-and-graphics/form-validation-problem#comment-1198505</link>
    <description> &lt;p&gt;Also, you need to put the following &lt;strong&gt;after&lt;/strong&gt; your &amp;lt;script&amp;gt; tag:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;// &amp;lt;[CDATA[&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
and the following &lt;strong&gt;before&lt;/strong&gt; your &amp;lt;/script&amp;gt; tag:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;// ]]&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
As you&#039;re using XHTML, don&#039;t use the old comment method in your JavaScript! It will work for now, but as soon as you serve that document with a MIME type of &lt;a href=&quot;http://www.w3.org/TR/xhtml-media-types/#application-xhtml-xml&quot; class=&quot;bb-url&quot;&gt;application/xhtml+xml&lt;/a&gt; the parser will throw all the code in comments out! For example, using the old method of hiding JavaScript from Validators and old browsers:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .... code ....&lt;br /&gt;--&amp;gt;&lt;br /&gt;&amp;amp;lt;/script&amp;amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
And the new method (which is what should be used with XHTML):&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&lt;br /&gt;// &amp;lt;[CDATA[&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .... code ....&lt;br /&gt;// ]]&amp;gt;&lt;br /&gt;&amp;amp;lt;/script&amp;amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
You should use the second method with XHTML, as when the MIME Type is changed to &lt;a href=&quot;http://www.w3.org/TR/xhtml-media-types/#application-xhtml-xml&quot; class=&quot;bb-url&quot;&gt;application/xhtml+xml&lt;/a&gt; comments are entirely ignored by the browser, even if they&#039;re scripts (just the way that XML works).&lt;/p&gt;
&lt;p&gt;The second method uses comments, but only single line ones so that browsers don&#039;t choke on a &amp;lt;[CDATA[ declaration being within a &amp;lt;script&amp;gt; tag, which is illegal as far as the browser is concerned. Also those are JavaScript comments, so an XML parser won&#039;t ignore their contents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you really want to avoid all these headaches&lt;/strong&gt;, then put all your JavaScript into external files. if you want to get really semantic avoid the onclick event and use &lt;a href=&quot;http://developer.mozilla.org/en/docs/DOM:element.addEventListener&quot; class=&quot;bb-url&quot;&gt;addEventListener&lt;/a&gt; in external files instead. This really seperates code from content, and when you&#039;re done you can look over your code with great satisfaction. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;--------------------------------&lt;/p&gt;
&lt;p&gt;The only other problem is that you&#039;re not putting quotes around your attribute values. For example, instead of this:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;input type=hidden name=&amp;quot;specialid:16052&amp;quot; value=&amp;quot;7EXT&amp;quot;&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
You should have:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;specialid:16052&amp;quot; value=&amp;quot;7EXT&amp;quot;&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
Notice the quotation marks around &lt;em&gt;hidden&lt;/em&gt;. All XHTML attributes need to contained within quotation marks like this, it&#039;s one of the rules of the language.&lt;/p&gt;
&lt;p&gt;There may be more problems, but those two are the big ones. Good luck with fixing them and come back if you get stuck. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 28 Apr 2006 12:21:52 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1198505 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/web-design-and-graphics/form-validation-problem#comment-1198502</link>
    <description> &lt;p&gt;If that page is called signup.pl the javascript validation should be before the form, though javascript is useless for validation as it can be disabled, really, if you can use server side (PHP, ASP, CF etc)&lt;br /&gt;
Also the redirect shouldn&#039;t be on the page, anyone can just look at the source and go directly to the redirect without submitting the form&lt;/p&gt;
 </description>
     <pubDate>Fri, 28 Apr 2006 10:46:54 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1198502 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
