Click to See Complete Forum and Search --> : Parent window refresh problem !


shamik
08-22-2003, 04:46 PM
Hi guys, I'm having a nightmare with refreshing a parent window from a child window.The child window has a close button which basically invokes the parent window and refreshes it.The fucntion I'm using in child window is:

function closeWin() {
window.opener.location.reload();
window.close();
}

Now the problem is,this reload function is behaving like the browser F5,its popping up that refresh/cancel window.When I click on refresh,the parent window is getting refreshed with the updated value.The parent window is being generated thru a servlet.

I'll appreciate if someone can bail me out.

Khalid Ali
08-22-2003, 05:16 PM
your question is hard to understand....however,if you mean that parent window is not being refreshed then

use
window.location.reload(true);

and if you mean that the child window is showing a message before its closed then you need to add couple more lines of code in it...

shamik
08-22-2003, 05:27 PM
Hi Khalid...thanx for ur reply,well,the child window doesn't show any msg.....its closing on window.close() . The problem is with refreshing the parent window.Its generating the browser popup msg asking for retry or cancel.Pls refer to the attachment,I guess it'll make things clear.
I've tried using window.opener.document.location.reload(true);
But its giving me the same problem,ie the retry message is coming.

AdamBrill
08-22-2003, 10:21 PM
The problem is that you submitted a form to the page. Try this code instead:window.opener.location=window.opener.location;That is untested, but I think it should work...

pareshrathod
05-02-2007, 01:47 AM
Shamik i want the code from you without refresh dialog.