Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<input type='radio' value='Yes' name='Answer' />Yes
<input type='radio' value='No' name='Answer' />No
<input type='radio' value='Yes' name='Answer' />Maybe
for(var i=0; i<document.MainForm.Answer.length; i++)
{
if(document.MainForm.Answer[i].checked)
{
parent.document.Form1.someElement.value = document.MainForm.Answer[i].value;
break;
}
}
Could you explain this like to me?
for(var i=0; i<document.MainForm.Answer.length; i++)
for(var x=0; x<28; x++)
{
var radioGroup = document.forms["MainForm"].[b]elements["radioGroup"+x][/b];
for(var i=0; i<radioGroup.length; i++)
{
if(document.MainForm.Answer[i].checked)
{
parent.document.forms["Form1"].[b]elements["someElement"+x][/b].value = radioGroup[i].value;
break; [i]//if this breaks out of BOTH for-loops, then drop it.[/i]
}
}
}