I tried putting the onSubmit into the submit tag, and that did pop up
the next page in a popup window, but none of the other input variables
are being passed to the page, so it displays an error instead of the
correct information.
Does anyone know how to do this?
Thanks,
Marshall
I found this code that may be useful for you:
http://www.sitepoint.com/forums/showthread.php?t=51550
The idea is to read out your form elements and put them into
MYSCRIPT.CGI?var1=a&var2=b. It works only with a GET-request:
<html>
<head>
<script language="javascript">
function submitFunction(i) {
if (i==1) {
document.theForm.target = "";
document.theForm.action = "MYSCRIPT.CGI?var1=a&var2=b";
}
if (i==2) {
document.theForm.target = "pWindow";
document.theForm.action = "MYSCRIPT.CGI?var1=a&var2=b";
window.open('','pWindow','width=500,height=400');
}
document.theForm.submit()
}
</script>
</head>
<body>
<form name="theForm">
<input type="button" value="Submit to _self"
onClick="submitFunction(1)">
<input type="button" value="Submit to popup"
onClick="submitFunction(2)">
</form>
</body>
</html>