arru_in
asked on
How to refresh my browser, when user performs some action
In my jsp page, i have a button when it is clicked i will
open a new window (using java script window.open()).
when the new window is submitted, i need to close
the new window and refresh the main page.
How do i do it?
Thanks in advance
Arru
open a new window (using java script window.open()).
when the new window is submitted, i need to close
the new window and refresh the main page.
How do i do it?
Thanks in advance
Arru
try this:
self.opener.location = ""+self.opener.location.hr ef;
self.close();
self.opener.location = ""+self.opener.location.hr
self.close();
also, where is this code in relation to the form being submitted? is it after the form submits and returns, or is it just before the form submits?
If the later, then you want to do this in this order:
self.opener.location = ""+self.opener.location.hr ef;
document.forms[0].submit() ;
setTimtout("self.close()", 500);
If the later, then you want to do this in this order:
self.opener.location = ""+self.opener.location.hr
document.forms[0].submit()
setTimtout("self.close()",
doh! sorry! i put it in the wrong order myself!
self.opener.location = ""+self.opener.location.hr ef;
setTimtout("self.close()", 500);
document.forms[0].submit() ;
of course, by attempting this at all, there is no guarantee that the parent window will be refreshed with the form data -- IF you are doing the refresh and close BEFORE the form submits.
self.opener.location = ""+self.opener.location.hr
setTimtout("self.close()",
document.forms[0].submit()
of course, by attempting this at all, there is no guarantee that the parent window will be refreshed with the form data -- IF you are doing the refresh and close BEFORE the form submits.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks knightEknight it works.. the main page is refreshed
but i have a java script tree in the main page which is not in fully expanded form. anyway thats my problem..
thanks
Arru
but i have a java script tree in the main page which is not in fully expanded form. anyway thats my problem..
thanks
Arru
ASKER
is there any way to do it in javascript something like window.opener.document.ref