RichardJW
10-19-2005, 12:50 PM
Hi, just a quick query. I have some inline javascript to submit a form with an onclick event.
I just recently decided to pull the script into a function and send the relevant URL info as a variable.
All seemed fine until I re-tested in IE5 - it now will not submit the form, although the code should be the same.
The function works in IE6, Opera, Safari, Camino and IE5.2 (Mac)
What has happened with it in IE5?!
Any thoughts?
Original inline JS:
onClick="window.document.myform.action='mypge2.asp';
window.document.myform.method='GET';
window.document.myform.submit(); return false;"
New function to replace inline JS (With alerts):
function nextpage(page) {
alert(page);
window.document.myform.action=page;
window.document.myform.method='GET';
alert(window.document.myform.method);
window.document.myform.submit();
return false;
}
Event to access function:
onClick="nextpage('mypge2.asp')"
I just recently decided to pull the script into a function and send the relevant URL info as a variable.
All seemed fine until I re-tested in IE5 - it now will not submit the form, although the code should be the same.
The function works in IE6, Opera, Safari, Camino and IE5.2 (Mac)
What has happened with it in IE5?!
Any thoughts?
Original inline JS:
onClick="window.document.myform.action='mypge2.asp';
window.document.myform.method='GET';
window.document.myform.submit(); return false;"
New function to replace inline JS (With alerts):
function nextpage(page) {
alert(page);
window.document.myform.action=page;
window.document.myform.method='GET';
alert(window.document.myform.method);
window.document.myform.submit();
return false;
}
Event to access function:
onClick="nextpage('mypge2.asp')"