<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1012479" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1012479</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-validation-0#comment-1072154</link>
    <description> &lt;p&gt;Vinny,&lt;/p&gt;
&lt;p&gt;Yes, I have three selection lists, one for ordering tickets for each performance.  I&#039;ve set each list to have &quot;0&quot; selected to start with.  What I want the code to be doing is checking to see if each list still has &quot;0&quot; selected when they hit submit, meaning that they are submitting a ticket order without specifying any tickets for any day.  The code, as I have it in my last post seems to be doing what I want. If all three are left at &quot;0&quot;, I get an error message telling the viewer he hasn&#039;t ordered any tickets.  If any one of the lists has a non-zero selection, the order goes through fine. Do you see any problem with the code as it is?  Thanks.&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;
 </description>
     <pubDate>Mon, 02 Oct 2000 17:29:35 +0000</pubDate>
 <dc:creator>Bob</dc:creator>
 <guid isPermaLink="false">comment 1072154 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-validation-0#comment-1072148</link>
    <description> &lt;p&gt;Hi Bob,&lt;/p&gt;
&lt;p&gt;  You were right about the code being NN-friendly. &lt;/p&gt;
&lt;p&gt;  Question, though, are you playing with 3 selection lists? Because if(this &amp;amp;&amp;amp; that &amp;amp;&amp;amp; third) means all 3 have to have to be true.  Is that what you want? Or, do you want at least one of the selection lists to have an option selected?&lt;/p&gt;
&lt;p&gt;Vinny&lt;/p&gt;
 </description>
     <pubDate>Mon, 02 Oct 2000 16:23:26 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1072148 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-validation-0#comment-1072125</link>
    <description> &lt;p&gt;Vinny,&lt;/p&gt;
&lt;p&gt;Thanks.  I have both NS and IE viewers, although most are probably IE (through AOL).  I always try to write everything so it works on both browsers.  The code I gave you does work with both NS and IE.  I also tried using:&lt;/p&gt;
&lt;p&gt;if(document.orderForm.day1.selectedIndex==0 &amp;amp;&amp;amp;&lt;br /&gt;
         document.orderForm.day2.selectedIndex==0  &amp;amp;&amp;amp;&lt;br /&gt;
         document.orderForm.day3.selectedIndex==0){&lt;br /&gt;
         alert(&quot;You have not specified any ticket order&quot;);&lt;br /&gt;
         return false;&lt;br /&gt;
         } &lt;/p&gt;
&lt;p&gt;and this seems to work fine on both NS and IE also.  I&#039;m not sure if I totally follow the example you gave in the last post.  Can you take what I have above and put it into the syntax you gave?  Thanks.&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;
 </description>
     <pubDate>Sun, 01 Oct 2000 21:01:54 +0000</pubDate>
 <dc:creator>Bob</dc:creator>
 <guid isPermaLink="false">comment 1072125 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-validation-0#comment-1072109</link>
    <description> &lt;p&gt;Hi Bob,&lt;/p&gt;
&lt;p&gt;  I&#039;m presuming you have have 3 selection lists (day1...day3)&lt;br /&gt;
  Are your surfers only IE-users?  Because if not, netscape will have a lot to say about the code == all of it bad.  The full syntax for a selection list is:&lt;/p&gt;
&lt;p&gt;document.formname.selectname.options[document.formname.selectname.selectedIndex].property&lt;/p&gt;
&lt;p&gt;Even if you are only concerned about IE, it is not a good idea to get caught in M$&#039;s shortcuts.&lt;/p&gt;
&lt;p&gt;Vinny&lt;/p&gt;
 </description>
     <pubDate>Sun, 01 Oct 2000 17:28:24 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1072109 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-validation-0#comment-1072096</link>
    <description> &lt;p&gt;Vinny,&lt;/p&gt;
&lt;p&gt;Thanks for the help!  I ended up figuring out another way also.  I used the following:&lt;/p&gt;
&lt;p&gt;if(document.orderForm.day1[0].selected==true &amp;amp;&amp;amp;&lt;br /&gt;
         document.orderForm.day2[0].selected == true &amp;amp;&amp;amp;&lt;br /&gt;
         document.orderForm.day3[0].selected == true){&lt;br /&gt;
          alert(&quot;You have not specified any ticket order&quot;);&lt;br /&gt;
          return false;&lt;br /&gt;
          }&lt;/p&gt;
&lt;p&gt;This seems to work fine, or am I missing something that would cause it not to work somehow?  Thanks again.&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;
 </description>
     <pubDate>Sun, 01 Oct 2000 13:53:51 +0000</pubDate>
 <dc:creator>Bob</dc:creator>
 <guid isPermaLink="false">comment 1072096 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/form-validation-0#comment-1072084</link>
    <description> &lt;p&gt;Hi Bob,&lt;/p&gt;
&lt;p&gt;  There&#039;s a &quot;Validating Forms&quot; script/tutorial at my site that checks all form elements (except select-multiple (which I forgot but amounts to the same as a select-one).  Essentially, you set up a var, loop through the selection list, see if anything is selected and if so, whether it&#039;s equal to 0 (if that&#039;s a nogood number)&lt;/p&gt;
&lt;p&gt;The following will work for more than one selection list, and assumes it is called with a regular button:&lt;/p&gt;
&lt;p&gt;function valThis(formObj)&lt;br /&gt;
{&lt;br /&gt;
  var ok2Send = true;&lt;br /&gt;
  var selOption = 0;&lt;br /&gt;
  for (i=0; i &amp;lt; formObj.length; i++)&lt;/p&gt;
&lt;p&gt;   if (formObj.elements[i].type == &quot;select-one&quot;)&lt;br /&gt;
   {&lt;br /&gt;
     for (j=0; j &amp;lt; formObj.elements[i].length; j++)&lt;br /&gt;
       if (formObj.elements[i].options[j].selected)&lt;br /&gt;
       {&lt;br /&gt;
         selOption = j;&lt;br /&gt;
       }&lt;br /&gt;
     if (selOption == 0)&lt;br /&gt;
     {&lt;br /&gt;
       ok2Send = false;&lt;br /&gt;
       alert(&quot;You must make a selection&quot;)&lt;br /&gt;
       formObj.elements[i].focus();&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;/p&gt;
&lt;p&gt;  if (ok2Send)&lt;br /&gt;
    formObj.submit();&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Vinny&lt;/p&gt;
 </description>
     <pubDate>Sun, 01 Oct 2000 02:58:19 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1072084 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
