I've found some script that I can work with on this, but I'm very green to JavaScripts.
I am writing a CGI application. I have a parent page that I have a button on to open a pop-up window. This window should submit a form so that a record is added. It should then close the window and refresh the parent, showing the new record.
I find that I am closing and refreshing just fine. I need to actually submit the form and that's where I'm stuck.
Here are some of the key code snippets ...
<SCRIPT language=JavaScript>
<!--
function win(){
document.addCarton.submit();
window.opener.location.href="/pathName/programName";
self.close();
//-->
}
</SCRIPT>
<form name="addCarton" method="/pathName/programName">
<input name="addBtn" type="submit" id="addBtn" value="Add Carton" onClick="win();">
When run .. win() seems to run because it closes the window and refreshes the page. But I don't think the form is submit!
I am writing a CGI application. I have a parent page that I have a button on to open a pop-up window. This window should submit a form so that a record is added. It should then close the window and refresh the parent, showing the new record.
I find that I am closing and refreshing just fine. I need to actually submit the form and that's where I'm stuck.
Here are some of the key code snippets ...
<SCRIPT language=JavaScript>
<!--
function win(){
document.addCarton.submit();
window.opener.location.href="/pathName/programName";
self.close();
//-->
}
</SCRIPT>
<form name="addCarton" method="/pathName/programName">
<input name="addBtn" type="submit" id="addBtn" value="Add Carton" onClick="win();">
When run .. win() seems to run because it closes the window and refreshes the page. But I don't think the form is submit!