codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Open hidden window from Pop-up  jacobs7 at 03:10 on Thursday, June 10, 2004
 

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()">








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  parent.Resize() in multi tabbed IE window
•  Re: How to Remove the URL`s from printouts
•  Re: 2 or more scripts
•  Re: query can we
•  Re: Disbale edit
•  Re: How to get all the properties values of an object
•  Re: Catalog
•  Re: DHTML drop down menu
•  Re: Where do I find source code on this site?


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010