<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1016547" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1016547</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-validation#comment-1096130</link>
    <description> &lt;p&gt;Hi artsapimp,&lt;/p&gt;
&lt;p&gt;Re:&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: If the textarea&#039;s name is Textarea then...&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;reminds of the man who said, &quot;Doc, it hurts when I do this&quot;. To which the Doc said, &quot;Don&#039;t do it&quot;&lt;/p&gt;
&lt;p&gt;Never use reserved words as either variables or their values; you will get away with it once in a while; the rest of the time, you will crash.&lt;/p&gt;
&lt;p&gt;Regarding your radio code: Did you check the &quot;Validating Forms&quot; script/tutorial at my site?  In it, I state that radio buttons are an array, and have to be treated with the following method:&lt;/p&gt;
&lt;p&gt;function whatRadio(fldObj)&lt;br /&gt;
{&lt;br /&gt;
  for (i=0;i&amp;lt; fldObj.length; i++)&lt;br /&gt;
      if (fldObj[i].checked)&lt;br /&gt;
         alert(fldObj[i].value)&lt;br /&gt;
}&lt;br /&gt;
....onClick=&quot;return whatRadio(this.form.NewOrReplacement)&quot;&amp;gt;New&lt;/p&gt;
&lt;p&gt;Note I added an onClick to the second button&lt;/p&gt;
&lt;p&gt;Vinny&lt;/p&gt;
 </description>
     <pubDate>Thu, 13 Dec 2001 15:30:26 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1096130 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-validation#comment-1096129</link>
    <description> &lt;p&gt;Let me show you what I don&#039;t understand.  This does not work for me.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;whatRadio&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;document&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;ManReq&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;NewOrReplacement&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;value &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;== \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;New\&quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&#039;Yes&#039;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&#039;No&#039;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;...&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td colspan=\&quot;2\&quot;&amp;gt;&amp;lt;input type=\&quot;Radio\&quot; name=\&quot;NewOrReplacement\&quot; value=\&quot;New\&quot; onClick=\&quot;return whatRadio()\&quot;&amp;gt;New&amp;lt;/td&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;td colspan=\&quot;2\&quot;&amp;gt;&amp;lt;input type=\&quot;Radio\&quot; name=\&quot;NewOrReplacement\&quot; value=\&quot;Replacement\&quot;&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;This always alerts &#039;No&#039;.  How would I change this to work?&lt;/p&gt;
 </description>
     <pubDate>Thu, 13 Dec 2001 15:13:00 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1096129 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Try true false</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-validation#comment-1096104</link>
    <description> &lt;p&gt;Test for true or false for checkboxes and radio buttons.&lt;/p&gt;
&lt;p&gt;&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; Suzanne&lt;/p&gt;
 </description>
     <pubDate>Thu, 13 Dec 2001 03:42:57 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1096104 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-validation#comment-1096053</link>
    <description> &lt;p&gt;No, that also works for me.  I am wanting to know how to validate a Radio button, Textarea, Checkbox, etc.&lt;/p&gt;
&lt;p&gt;If the textarea&#039;s name is Textarea then&lt;/p&gt;
&lt;p&gt;document.theForm.Textarea.value == &quot;&quot; is always false.  It is never == &quot;&quot; when I try to do it.  The same is true for everything except Text boxes.&lt;/p&gt;
&lt;p&gt;Is there something else that should be written for each of them?&lt;/p&gt;
 </description>
     <pubDate>Wed, 12 Dec 2001 22:29:06 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1096053 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-validation#comment-1096051</link>
    <description> &lt;p&gt;Hi artsapimp,&lt;/p&gt;
&lt;p&gt;the following works for me (nn4.7, ie6, &amp;amp; should for nn6):&lt;br /&gt;
[code]&lt;br /&gt;
&amp;lt;script language=&quot;javascript&quot;&amp;gt;&lt;br /&gt;
function isFormComplete(){&lt;br /&gt;
if(document.theForm.a.value == &quot;&quot;)&lt;br /&gt;
     {&lt;br /&gt;
     alert(&#039;You must complete the Text Box&#039;);&lt;br /&gt;
     return false;&lt;br /&gt;
     }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;[\code]&lt;/p&gt;
&lt;p&gt;so, the question is what does your actual form look like?  Insofar as validating all types of fields: see the &quot;Validating Forms&quot; script/tutorial at my site&lt;/p&gt;
&lt;p&gt;vinny&lt;/p&gt;
 </description>
     <pubDate>Wed, 12 Dec 2001 20:38:18 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1096051 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-validation#comment-1096048</link>
    <description> &lt;p&gt;That part of it is what I thought until I tried it with a textarea.  The textarea never seems to equal &quot;&quot;.&lt;/p&gt;
&lt;p&gt;When I do if(document.theForm.Textarea.value = &quot;&quot;) it always disregards the next steps as if it doesn&#039;t = &quot;&quot;.  What am I doing wrong there?&lt;/p&gt;
 </description>
     <pubDate>Wed, 12 Dec 2001 19:30:14 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1096048 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>think of javascript as an onion...</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/javascript-validation#comment-1096046</link>
    <description> &lt;p&gt;And so to control elements on the page, you have to work your way down through the layers.&lt;/p&gt;
&lt;p&gt;You can use generic terms and numbers to count down, or use the NAME attribute in the field elements to control it, so...&lt;/p&gt;
&lt;p&gt;document.theForm.TextBox.value&lt;/p&gt;
&lt;p&gt;would be&lt;/p&gt;
&lt;p&gt;document.theForm.nameOfField.value&lt;/p&gt;
&lt;p&gt;And whatever your checkbox, radio button, et cetera is named replaces nameOfField.&lt;/p&gt;
&lt;p&gt;&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; Suzanne&lt;/p&gt;
&lt;p&gt;disclaimer: I&#039;m answering the broad question, I didn&#039;t look at the actual validity of the JavaScript&lt;/p&gt;
 </description>
     <pubDate>Wed, 12 Dec 2001 19:17:14 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1096046 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
