aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Refresh Issue 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 "Refresh Issue" Watch "Refresh Issue" New topic
Author

Refresh Issue

ShivPrakash Srivastava
Ranch Hand

Joined: Mar 24, 2005
Posts: 88
Hi All,

I have link on the values in my application.When I click the link,transaction detail for that value is displayed.When I have two windows opened,each displaying the transaction details and then refresh any one window,the values are changed and displays the value which is there in another window.Can anyone knows how to solve this issue.

Thanks and Regards
Shiv
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
unless JavaScript opened the other window, there is no way for one window to control another.

Eric
ShivPrakash Srivastava
Ranch Hand

Joined: Mar 24, 2005
Posts: 88
Hi Eric,

Both the windows are opened using window.open() method.Whenever I refresh the first window,it loads the details of the second window.But vice versa does not happen.The second window loads its data when refreshed.Is there any way to resolve this issue ?

Thanks and Regards
Shiv
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
what is the relationship bewteen the windows?

opener child

Eric
ShivPrakash Srivastava
Ranch Hand

Joined: Mar 24, 2005
Posts: 88
Hi Eric,

Both are Child windows and independent of each other.Whenever I click on the values a new window is opened with their transaction details.

Thanks and Regards
Shiv
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
well when you do window.open you should be assigning it a name

var winPop1 = window.open(...
var winPop2 = window.open(...

you can talk to the other windows via the parent to reload the other window like:

window.opener.winPop1.document.location.reload();

or

window.opener.winPop1.document.location.href = window.opener.winPop1.document.location.href;

Eric
ShivPrakash Srivastava
Ranch Hand

Joined: Mar 24, 2005
Posts: 88
Hi Eric,

How can I stop the data displayed in the second window display in the first window when refreshed?

window.open() method is in loop and iam passing unique value for the name to open new window.

var winName = uniqueName;
var mywin = window.open ("detail.jsp", winName ,"height=650, toolbar=no, resizable=yes, scrollbars=yes, menubar=no, screenX=50, screenY=50,location=no, directories=no, status=no,titlebar=yes");

morevoer,Iam getting error for window.opener.

Thanks and Regards
Shiv
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
you need to do it as an array/object

I talked about closing multiple windows here: http://radio.javaranch.com/pascarello/2005/01/19/1106152877000.html

That should give you a basic idea

Eric
ShivPrakash Srivastava
Ranch Hand

Joined: Mar 24, 2005
Posts: 88
Hi Eric,

I think you got it completely wrong or maybe I was not able to put it in a right way.

I will try one more time.

In my applcation,I have links on the value.When I click that link a new window is opened displaying the details.Similarly when I click on another link,I get a new window opened displaying the details.

Now I have two windows open....when I refresh the first window...it loads the data of the second window but it does not happen vice versa.Basically,if a window is refreshed,it loads the same data...unfortunately it does not happen here.Is there any way to resolve this issue?

Thanks and Regards
Shiv
Oricio Ocle
Ranch Hand

Joined: Nov 30, 2004
Posts: 284

Hello,
It seems the browser can not difference between them.
Maybe due to cache issues.
Post your code, how are they being opened?
something like:

or


Regards
[ September 11, 2006: Message edited by: Oricio Ocle ]

SCJP, OCMJD, OCMJEA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Refresh Issue