JavaScript problem : Corresponding Parent window not geting refreshed.

Hello,

I have a strange problem with the application that iam developing. OK let me explain the scenerio...

I have an application which is built in JSP infact with JavaScript validation for the form entries. Now i open two instances of this application in two seperate IE browsers, lets say i opened the application in Window1 and Window2. In the application i have a link which opens a POPUP window. This POPUP is nothiing but a form with JavaScript validations. When i submit this form i want the information in the corresponding parent window to be refreshed and POPUP closed.

Now here is my problem. When i open the POPUP in Window1 and after submiting, the parent window ie Window1 gets refreshed. But if I open the POPUP in Window2 and after submiting , the Window1 is geting refreshed instead of Window2. I tried the following JavaScript code segments, but didnt work.

window.opener.location.reload(1);
self.close();

Now the solution that i want is either the corresponding window that opened the POPUP should be refreshed or both(or all) the instances of the application should be refreshed instead of only refreshing the first window that was opened.

Thanks in advance,

Jejo.
[1254 byte] By [jejob007] at [2007-11-20 8:33:31]
# 1 Re: JavaScript problem : Corresponding Parent window not geting refreshed.
Have you properly declared both windows with different window identifiers? For example...

<script type="text/javascript">
var window1 = window.open(...);
var window2 = window.open(...);

// now when working with them you would use
window1.location = ...
</script>
PeejAvery at 2007-11-8 0:42:36 >
# 2 Re: JavaScript problem : Corresponding Parent window not geting refreshed.
Both the windows are the main page of my application. So how can i declare them in another window.

jejo
jejob007 at 2007-11-8 0:43:30 >
# 3 Re: JavaScript problem : Corresponding Parent window not geting refreshed.
You only declare them on opening. That would be the main page. Then, from any page, you can call them using that declared name as I showed in my first post.
PeejAvery at 2007-11-8 0:44:40 >
# 4 Re: JavaScript problem : Corresponding Parent window not geting refreshed.
Hello,

I want to ask u that does the three dots u specified in the open function mean anything ? Does it mean the object window1 points to this particular window that was already opened ?.
Jejo.
jejob007 at 2007-11-8 0:45:39 >
# 5 Re: JavaScript problem : Corresponding Parent window not geting refreshed.
The ellipsis (three dots) is just a continuation of code. You know what to put there and it is just used for example. The part to focus on was the declaration of windows.
PeejAvery at 2007-11-8 0:46:41 >