• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Refresh Issue

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
unless JavaScript opened the other window, there is no way for one window to control another.

Eric
 
ShivPrakash Srivastava
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the relationship bewteen the windows?

opener child

Eric
 
ShivPrakash Srivastava
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 284
Netbeans IDE Firefox Browser Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
We can walk to school together. And we can both read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic