Menu
I am trying to find the selected radio button and return the string. See comment in code.
[code=php]
function findSelected(question, myForm)
{
for(g=0; g<4; g++)
{
theQuest=getObject(“quest” + question);
alert(theQuest.value);
alert(theQuest[1].value);
if(theQuest[g].checked==true)
theOutput=theQuest[g].value;
}
return theOutput;
}
function getObject(id)
{
if (ns4dom) ref=”document.”+id;
else if (iedom) ref=id;
else if (w3cdom) ref=”document.getElementById(‘”+id+”‘)”;
var object=eval(ref); //quest7 is undefined????????
return object;
}