I'm writing a long online questionnaire that needs several skips. The html code posted is an
example on my need.
If the respondent answers "Do not listen to Music" we would just skip to "Thanks"
<script type="text/javascript>
<!--
function skip1_radio_value()
{
for (var i=0; i < document.musicform.scrn.length; i++)
{
if (document.musicform.scrn.checked)=1 /Continue to the next question
if (document.musicform.scrn.checked)=2 /Continue to to "Thanks for your time."
}
}
//-->
</script>
<form name="musicform">
Do you listen to music?<br>
<input type="radio" name="scrn" value="1" checked="checked"> Yes<br>
<input type="radio" name="scrn" value="2"> No<br>
<input type="submit" onclick="get_radio_value()"><br><br>
Which one is your favorite music?<br>
<input type="radio" name="music" value="1" checked="checked"> Rock<br>
<input type="radio" name="music" value="2"> Reggae<br>
<input type="radio" name="music" value="3"> Pop<br>
<input type="radio" name="music" value="4"> Rap<br>
<input type="radio" name="music" value="5"> Metal<br>
<input type="submit" value="Submit" class="Send" id="submit" />
<br>
Thanks for your time. <br>
</form>
example on my need.
If the respondent answers "Do not listen to Music" we would just skip to "Thanks"
<script type="text/javascript>
<!--
function skip1_radio_value()
{
for (var i=0; i < document.musicform.scrn.length; i++)
{
if (document.musicform.scrn.checked)=1 /Continue to the next question
if (document.musicform.scrn.checked)=2 /Continue to to "Thanks for your time."
}
}
//-->
</script>
<form name="musicform">
Do you listen to music?<br>
<input type="radio" name="scrn" value="1" checked="checked"> Yes<br>
<input type="radio" name="scrn" value="2"> No<br>
<input type="submit" onclick="get_radio_value()"><br><br>
Which one is your favorite music?<br>
<input type="radio" name="music" value="1" checked="checked"> Rock<br>
<input type="radio" name="music" value="2"> Reggae<br>
<input type="radio" name="music" value="3"> Pop<br>
<input type="radio" name="music" value="4"> Rap<br>
<input type="radio" name="music" value="5"> Metal<br>
<input type="submit" value="Submit" class="Send" id="submit" />
<br>
Thanks for your time. <br>
</form>