CodeLover
asked on
How to refresh parent window after submitting from child window?
Hi, all
I am creating a web page. When I click on a button on the page, a new window opens. I use "window.showModelessDialog " to do it. When I enter some text on the new window and submit, the parent window will refresh. Could you please tell me how to do it and give some sample codes? Thanks.
I am creating a web page. When I click on a button on the page, a new window opens. I use "window.showModelessDialog
is this what you are looking for?
function submitAndClose(theForm)
{
theForm.submit();
window.opener.location.rel oad()
}
<form name="someForm" action="someAction.asp">
<input type="text">
<input type="button" value="submit" onclick="submitAndRefresh( document.f orms[this] )">
</form>
function submitAndClose(theForm)
{
theForm.submit();
window.opener.location.rel
}
<form name="someForm" action="someAction.asp">
<input type="text">
<input type="button" value="submit" onclick="submitAndRefresh(
</form>
ASKER
Hi, there
I WANT the parent to refresh. Thanks.
I WANT the parent to refresh. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you WANT the parent to refresh, or is it a side-effect you DON'T want?
if the text is submitted to the wrong window, try something like using a target="_self_ in your form or <base target="_self"/> in your heading...
B more specific please...
GL