There is one hyperlink in One.html and when I click on that link then window Two.html page having some images open[window.open(‘Two.html’,’mywindow’,’width=400,height=200′)]
I want, when I click on image on window then that same image will also appear in One.html
Below is my attempt:
One.html
<a id="id1" href="" onclick="window.open('OnclickPage.html','mywindow','width=400,height=200')">Click here</a>
<div id="area"></div>
Two.html
<img id="id1" class="img" src="image.gif"/><p/>
<img id="id2" class="img" src="cart.jpg"/><p/>
$.get("One.html").find($'area').append(clicked image from current window);//exactly not getting. please help me to correct
Please help me to correct page Two.html code.
All selected images from Two.html(reside in window) should instantly appear in One.html, like if we select one image then previous page should instantly updated with that image and if we select two images then previous page One.html should get updated instantly
Any kind of startup help will be highly appreciated!
Use the
openerobject in two.html.The
openerobject is a reference to the window that opened the new window.Then,
$(opener.document).find('#area')...should work..