Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic 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
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 8th, 2003, 11:00 AM
Registered User
 
Join Date: Nov 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retrieving a value from a different frame

Hi,

Can someone tell me please how I retrieve a value from a different frame.
What I’m looking for is when a page loads in one frame, the value of text box in this page gets the value in a drop-down box which is in a different frame.

I'm new to this so if you can keep it simple it will help.

thanks

plong
Reply With Quote
  #2 (permalink)  
Old December 8th, 2003, 09:54 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Sounds to me like you need to use this JavaScript:

document.getElementById("a_text_box").value = parent.frames.the_frame_with_the_select_box.docume nt.getElementById("the_select_box").selectedIndex;

If this works correctly, the text box value should be 0 if the first option is selected, 1 if the second, etc.

Sorry if this doesn't work, I haven't got the chance to try it. Sounds good to me, though!;)

Reply With Quote
  #3 (permalink)  
Old December 10th, 2003, 08:19 AM
Registered User
 
Join Date: Nov 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks.

plong

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
How to set one frame src from other frame akumarp2p ASP.NET 1.x and 2.0 Application Design 2 March 13th, 2007 04:13 AM
parsing form data from frame to other frame audio-catalyst Classic ASP Basics 5 January 3rd, 2006 02:57 PM
Call right frame Page_Load event from left frame. ochanarachel Classic ASP Basics 0 January 28th, 2005 05:13 AM
Refresh a frame from another frame czambran Javascript 3 October 21st, 2004 11:20 AM
Getting a value from another frame. How? plong Javascript How-To 4 December 10th, 2003 04:19 AM



All times are GMT -4. The time now is 06:21 AM.


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