File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes hide child window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "hide child window" Watch "hide child window" New topic
Author

hide child window

Nimish Patel
Ranch Hand

Joined: Jun 29, 2005
Posts: 84
hi,
in parent window i have created one frame( frame1).
and child window have a one submit button. when submit button press action is exucuted and output also display in frame1.
but i cannot hide child window. it still displays on top.
i try "self.close()" but it is not working with action and submit.
what should i do ? so i can hide child window and exucute action & do submit.
i have given code following but it dont hide child window.it is called by
child window submit button.
document.searchForm.target="frame1";
document.searchForm.action="/SIPProfile/View.do?userID="+xx;
document.searchForm.submit();
thanks in anticipation.
NIMISH PATEL.US
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
what happens when you do a window.close() after the submit line?
It should work. I had done that in one of the projects. What exactly happens when you write the .close() line and click submit?


Life called,so here I am.<br />Cheers<br />Niki.:-)
Nimish Patel
Ranch Hand

Joined: Jun 29, 2005
Posts: 84
Thanks niki for reply. i try but it is not working.
action & submit process is done and also output display in frame1.
but child window still open.
function submit()
{
document.searchForm.target="frame1";
document.searchForm.action="/SIPProfile/View.do?userID="+xx;
document.searchForm.submit();
window.close();
}
thanks,
Nimish
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
just guessing but try calling window.close() before you submit the form.
Nimish Patel
Ranch Hand

Joined: Jun 29, 2005
Posts: 84
thanks niki...
now it is working.
and have a good future.
bye bye.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
If you close the window before the submission, I have a feeling that your submission is never sent. You better check that....

Eric
Nimish Patel
Ranch Hand

Joined: Jun 29, 2005
Posts: 84
hi eric,
i have given the code.it is working.IT invokes view action and output also display in frame1(another JSP). so submit()is executed.

function submit()
{
document.searchForm.target="frame1";
document.searchForm.action="/SIPProfile/View.do?userID="+xx;
window.close();
document.searchForm.submit();
}

thanks for help,
nimish
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hide child window