Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 2nd, 2008, 01:20 AM
Authorized User
 
Join Date: Oct 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hafizmuhammadmushtaq Send a message via Yahoo to hafizmuhammadmushtaq
Default access opener window's elements in opened window

You are required to develop two HTML documents (web pages) as explained below:

„« The first page (AddStudent.html) will provide a number of rows to enter some information about students. Initially, there will be only one row to add a record. But user can add more rows by clicking the ¡§Add Row¡¨ button

Session combo box will contain the following options as shown in Figure 2:

Figure 3: Options in Session Combo

„« On clicking the update button against any row, another HTML document (UpdateStudent.html) will open up in a new window which will show exactly the same values entered or selected by the user in that row in the ¡§AddStudent.html¡¨ page.

For example, if in a 1st row, a user enters ¡§Saad¡¨ in the ¡§Name¡¨ text field, selects ¡§2005-2009¡¨ in the ¡§Session¡¨ combo box and checks the ¡§Repeater¡¨ checkbox, and then click on ¡§Update¡¨ button against it, same information must be displayed in the new window.
Hence, it illustrates that clicking the ¡§Update¡¨ button against a row will show only the respective information in a new window.

„« On UpdateStudent.html (opened up in new window), user can change any values like Name, Session or Repeater
 
Old April 7th, 2008, 10:00 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default

use window.opener and you have the 'window' object of the opener page in hand. Is this what u're looking for?

 
Old April 8th, 2008, 12:14 AM
Authorized User
 
Join Date: Oct 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hafizmuhammadmushtaq Send a message via Yahoo to hafizmuhammadmushtaq
Default

i know about window.opener...........but i want to access the entire row of the opener page in the opened window

 
Old April 8th, 2008, 01:43 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Once you have a reference to a window you can use methods and properteis of the window's document object to retrieve DOM elements and their content. Given that this is asked in the style of a homework question I'm sure you should have covered this.

--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
window.opener for mozilla jun99 Javascript 3 September 1st, 2009 08:57 AM
closed parent window when opened child window jaiwin Javascript How-To 0 October 8th, 2006 12:54 PM
Problem accessing the window.opener.opener maryuob Javascript 3 January 18th, 2006 05:25 AM
window.opener help fs22 Javascript How-To 6 May 9th, 2004 10:50 PM
window.opener.refresh matt.fields Javascript How-To 1 November 3rd, 2003 05:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.