Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: Beginning JavaScript 3rd Ed. ISBN: 978-0-470-05151-1
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning JavaScript 3rd Ed. ISBN: 978-0-470-05151-1
This is the forum to discuss the Wrox book Beginning JavaScript, 3rd Edition by Paul Wilton, Jeremy McPeak; ISBN: 9780470051511
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaScript 3rd Ed. ISBN: 978-0-470-05151-1 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old April 1st, 2010, 10:04 AM
Registered User
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation can any1 solve window.open() and window.opener issues

I'm doing a lil experiment on window.open 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 = window.open("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
  #2 (permalink)  
Old April 1st, 2010, 10:30 AM
Friend of Wrox
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts

bgcolor should be spelled as bgColor with captial C:
<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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
window.opener for mozilla jun99 Javascript 3 September 1st, 2009 08:57 AM
Problem accessing the window.opener.opener maryuob Javascript 3 January 18th, 2006 04:25 AM
window.opener problems crmpicco Javascript How-To 2 September 30th, 2005 03:46 AM
window.opener help fs22 Javascript How-To 6 May 9th, 2004 10:50 PM

All times are GMT -4. The time now is 11:23 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.