|
I have a main window which is a calendar with links on each day. Each link pops up a window to allow the user to make changes which will be updated to a database.
I know how to close the pop-up and cause the parent window to reload (thereby loading the updated data). What I am doing is submitting via form in the pop-up window to another page that does the actual updating (submitting the data to a Java Bean). What I can't seem to do is close the third page without having a close button or link. I'd like to be invisible to the user if possible:
<form action="/forum/modifyTrng.html" method="post" name="modifier">
.
.
.
<input type="submit" value="UPDATE" onClick="window.opener.location.reload();self.close();return false;">
<input type="submit" value="DELETE" onClick="window.opener.location.reload();self.close();return false;">
<input type="submit" value="CANCEL" onClick="window.close()">
The latter is a code fragment of what I have right now. The modifyTrng.jsp file has a bunch of parameter sets and procedure calls to the bean. How can I get this page to do it's thing, yet still have the first popup window self.close *and* have the parent/main window reload. Is this possible?
<Added>
This was added to the form to differentiate the type of submit. ModMode can be set to INSERT or UPDATE:
<input type="hidden" name="optionid" value="">
.
.
.
<SCRIPT>
function setOption(target){
if(target == 1) document.modifier.optionid.value="1";
if(target == 2) document.modifier.optionid.value="2";
if (target == 1 && <%=ModMode%> == "INSERT" ) document.modifier.optionid.value="3";
}
</SCRIPT>
<input type="submit" value="<%=ModMode%>" onClick="setOption(1);window.opener.location.reload();self.close();return false;">
<input type="submit" value="DELETE" onClick="setOption(2);window.opener.location.reload();self.close();return false;">
<input type="submit" value="CANCEL" onClick="window.close()">
|
|
|
|
|
|
|
|