471,120 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,120 software developers and data experts.

How can the change of second window trigger change of first window

xhe
Hi,
I met a technical difficulty and can not overcome.
I have 2 windows, let's name it window1 and window2.
Now in window1, I need to select an image, so I click the link on
window1 to open window2, here, window2 is opened in new browser, and
window1 is still there. And in window2, there are preview of 10
images. And what need to do is as soon as I select any image in
window2, I hope the image selected will be reflected in window1
simultaneous without refreshing window1.
I know this can be done, just don't know what technogy can be used to
trigger the window1 refresh.
we can use cookie to pass value from win2 to win1, but that still need
to refresh win1 manually.
Are there any good suggestions?
Thanks in advance.

Feb 9 '07 #1
1 1108
xhe said the following on 2/9/2007 12:52 PM:
Hi,
I met a technical difficulty and can not overcome.
I have 2 windows, let's name it window1 and window2.
Now in window1, I need to select an image, so I click the link on
window1 to open window2, here, window2 is opened in new browser, and
window1 is still there. And in window2, there are preview of 10
images. And what need to do is as soon as I select any image in
window2, I hope the image selected will be reflected in window1
simultaneous without refreshing window1.
I know this can be done, just don't know what technogy can be used to
trigger the window1 refresh.
we can use cookie to pass value from win2 to win1, but that still need
to refresh win1 manually.
Are there any good suggestions?
Thanks in advance.
window2 has a reference to its parent window via the window.opener
property. Then you have a reference to the parent window and you change
the image as you would in the same page:

window.opener.document.images['imageNAME'].src = newImage;

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 9 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Bernd Liebermann | last post: by
2 posts views Thread by RWD | last post: by
4 posts views Thread by Richard Cornford | last post: by
4 posts views Thread by Matik | last post: by
5 posts views Thread by midnight_use_only | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.