Note that there are some explanatory texts on larger screens.

plurals
  1. POprevious correct radio buttons disappearing when i miss a radio button in the middle
    text
    copied!<p>hey i facing one issue here,</p> <p>i am trying to validate at least one radio button to be answered to each question</p> <p>but the error here is when i miss some question to answer, i am getting alert, it is fine. but my previous correct answers also disappearing , i mean the page is loading from the start it seems.</p> <p><a href="http://jsfiddle.net/8ExAh/1/" rel="nofollow">workingfiddle here</a></p> <p>you can see my sample question form here</p> <pre><code>&lt;form name="myform" &gt; &lt;div id="Q1" class="question"&gt; &lt;h3&gt;1. How convenient is our company to use?&lt;/h3&gt; &lt;/div&gt; &lt;div id="A1"class="answers"&gt; &lt;input type="radio" name="Q1ans" value="1"&gt;Extremely convenient&lt;br&gt; &lt;input type="radio" name="Q1ans" value="2"&gt;Very convenient&lt;br&gt; &lt;input type="radio" name="Q1ans" value="3"&gt;Moderately convenient&lt;br&gt; &lt;input type="radio" name="Q1ans" value="4"&gt;Not at all convenient&lt;br&gt; &lt;/div&gt; &lt;div id="Q2" class="question"&gt; &lt;h3&gt;2. How professional is our company?&lt;/h3&gt; &lt;/div&gt; &lt;div id="A2"class="answers"&gt; &lt;input type="radio" name="Q2ans" value="1"&gt;Extremely professional&lt;br&gt; &lt;input type="radio" name="Q2ans" value="2"&gt;Very professional&lt;br&gt; &lt;input type="radio" name="Q2ans" value="3"&gt;Moderately professional&lt;br&gt; &lt;input type="radio" name="Q2ans" value="4"&gt;Not at all professional&lt;br&gt; &lt;/div&gt; &lt;div id="Q3" class="question"&gt; &lt;h3&gt;3. Compared to our competitors, is our product quality better, worse, or about the same?&lt;/h3&gt; &lt;/div&gt; &lt;div id="A3"class="answers"&gt; &lt;input type="radio" name="Q3ans" value="1"&gt;Much better&lt;br&gt; &lt;input type="radio" name="Q3ans" value="2"&gt;some what better&lt;br&gt; &lt;input type="radio" name="Q3ans" value="3"&gt;slightly better&lt;br&gt; &lt;input type="radio" name="Q3ans" value="4"&gt;worse&lt;br&gt; &lt;/div&gt; &lt;div id="Q4" class="question"&gt; &lt;h3&gt;4. How responsive is our company?&lt;/h3&gt; &lt;/div&gt; &lt;div id="A4"class="answers"&gt; &lt;input type="radio" name="Q4ans" value="1"&gt;Much better&lt;br&gt; &lt;input type="radio" name="Q4ans" value="2"&gt;some what better&lt;br&gt; &lt;input type="radio" name="Q4ans" value="3"&gt;slightly better&lt;br&gt; &lt;input type="radio" name="Q4ans" value="4"&gt;worse&lt;br&gt; &lt;/div&gt; &lt;div id="Q5" class="question"&gt; &lt;h3&gt;5. Do you like our company, neither like nor dislike it, or dislike it?&lt;/h3&gt; &lt;/div&gt; &lt;div id="A5"class="answers"&gt; &lt;input type="radio" name="Q5ans" value="1"&gt;Like a great deal&lt;br&gt; &lt;input type="radio" name="Q5ans" value="2"&gt;Like a little&lt;br&gt; &lt;input type="radio" name="Q5ans" value="3"&gt;Dislike a little&lt;br&gt; &lt;input type="radio" name="Q5ans" value="4"&gt;Dislike a great deal&lt;br&gt; &lt;/div&gt;&lt;br&gt;&lt;br&gt; &lt;button type="submit" onclick="validate()"&gt;submit&lt;/button&gt; &lt;/form&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload