IE5 Mac form submit
SOLVED
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.
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[Error: Irreparable invalid markup ('<oform.rformchoose.length;i++){>') in entry. Owner must fix manually. Raw contents below.]
<b><i>SOLVED</i></b>
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.
<lj-cut text="Here's the code">
<pre>
function submitAForm(oForm) {
var chosenForm
for (i=0;i<oForm.rFormChoose.length;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();
}
}
<form>
<input type="text" name="enteredText" size="18">
<input type="button" value="Go" name="btnSubmit" onClick="javascript:submitAForm(this.form)">
<br />
<input type="radio" value="webForm" name="rFormChoose" checked>Web
<input type="radio" value="peopleForm" name="rFormChoose">People
</form>
<!-- these are the hidden forms to submit depending on which radio button is chosen-->
<form name="webForm" ACTION="cutOutActualURL" METHOD="GET">
</form>
<form name="peopleForm" method="POST" action="cutOutActualURL">
</form>
<!-- end hidden forms -->
</pre>
</lj-cut>
Thoughts?
<b>Clarification:</b> Let me clarify that when I hit submit, the page does refresh with the two variables put up in the query string. I get to www.urlOfMyFormPage.com/?enteredText=yadayada&rFormChoose=webForm The page doesn't go to the action URLs of the search forms.
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.
<lj-cut text="Here's the code">
<pre>
function submitAForm(oForm) {
var chosenForm
for (i=0;i<oForm.rFormChoose.length;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();
}
}
<form>
<input type="text" name="enteredText" size="18">
<input type="button" value="Go" name="btnSubmit" onClick="javascript:submitAForm(this.form)">
<br />
<input type="radio" value="webForm" name="rFormChoose" checked>Web
<input type="radio" value="peopleForm" name="rFormChoose">People
</form>
<!-- these are the hidden forms to submit depending on which radio button is chosen-->
<form name="webForm" ACTION="cutOutActualURL" METHOD="GET">
</form>
<form name="peopleForm" method="POST" action="cutOutActualURL">
</form>
<!-- end hidden forms -->
</pre>
</lj-cut>
Thoughts?
<b>Clarification:</b> Let me clarify that when I hit submit, the page does refresh with the two variables put up in the query string. I get to www.urlOfMyFormPage.com/?enteredText=yadayada&rFormChoose=webForm The page doesn't go to the action URLs of the search forms.
