View Single Post
  #1 (permalink)  
Old April 1st, 2010, 10:04 AM
abhihello123 abhihello123 is offline
Registered User
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation can any1 solve and window.opener issues

I'm doing a lil experiment on to achieve certain result. Its something like when I open exp.htm and click on the link an existing page paintParent.htm should open and it has 1line of text in it. Through exp.htm we are appending one line of text to paintParent.htm. paintParent.htm is changing background color of exp.htm The codes are given below --


<script type="text/javascript">

function openNewLink() {

var newwindow ="paintParent.htm","mywindow","width=40 0,height=300");
newwindow.document.write("<b>this is exp.htm</b>");

return false;


<p> Click below to open paintParent.htm page and it will also change backcolor of this page to


<a href="" onclick = "return openNewLink()">click here</a>



<script type="text/javascript">
//this file will paint exp.htm when that file is opened.

document.write("this is paintParent.htm");
window.opener.document.bgcolor = "RED";

Reply With Quote