I'm making a search form that gives the user a text box, submit button, and two radio button options of what to search. There are actually three forms on the page. The one that is displayed, and the two search forms that don't appear. They're on the page, but not visible. From the user submitting the visible form, I determine which of the two hidden search forms to submit. I'm using Javascript to determine what radio button is clicked, which then determines what search form I submit.
My code works fine on IE and Firefox for PC and Firefox on the Mac. But it breaks on IE for the Mac. I've googled a bit and found several people have had similar problems, but I've not seen any solutions that would work for me. When I use IE for the Mac, the forms don't submit. If I can get them to submit, I think it'd all be good.
function submitAForm(oForm) {
var chosenForm
for (i=0;i if (oForm.rFormChoose[i].checked==true){
chosenForm = oForm.rFormChoose[i].value;
break;
}
}
if (chosenForm == "webForm") {
document.webForm.searchText.value = oForm.enteredText.value
document.webForm.submit();
}
if (chosenForm == "peopleForm") {
document.peopleForm.keyword.value = oForm.enteredText.value
document.peopleForm.submit();
}
}
Thoughts?