Back to the Web Developer's Journal Main Page
internet.com
side nav bar

The JavaScript Weenie has heard this question so often that she's kindly put together a brief page of links to articles and scripts that should help.
Javascript Articles:

HOW DID THEY DO THAT???

Find out in:
Amazing HTML



Site Map

Jobs at webdeveloper.com


Check out our Web-based
Discussion Groups:

Check out and join our email-based Mailing Lists for Web developers.


Developer Channel
FlashKit
Jobs.webdeveloper
JavaScript.com
JavaScriptSource
JustSMIL
ScriptSearch
Streaming Media World
WebDeveloper.com
WebReference
XMLFiles
WDVL
Discussion Groups Book Reviews Software Reviews Download Web Tools

There Are Many Easier Things To Do In Life

How do I use JavaScript to Pass Values from one Field, Frame or Window to Another?

by Paige Turner

As JavaScript Weenie, I've heard this question so often that I've decided to put together a page of links to articles and scripts that should help.
October 17, 2000

Here's quick introduction.

The main issue with transferring values from one place to another is making the correct reference to the value you want to transfer. If you have just one form on a page, with one field, and you want to extract an entered value and use it in, say, an alert box, that's relatively easy.

If you want to extract a value from a form and place it in another form, it gets more complicated because you have to be careful how you name your forms. The references to the values get longer and more complicated.

Transferring between frames again requires care with names.

If you want to transfer values between windows, you're asking for trouble. The reason is that you're entering into Document Object Model (DOM) territory, and the Netscape and Explorer DOMs are quite different. It's not too hard to make the transfer work in just one type of browser, but doing it for both main browsers requires many lines of cross-browser JavaScript. In fact the cross-browser version is so difficult that it's rarely done - we've found no reference to it on the Internet. You'll almost certainly have to parse the browser and supply different code for the two main types.

All in all, transferring values using JavaScript is a tricky business and you'll need a decent knowledge of JavaScript to adapt the examples below to your specific requirements.

Tutorials

Passing parameters and returning values.
http://www.webdevelopersjournal.com/articles/jsintro3/js_begin3.html

Writing across windows in IE5 (begins half way down the page).
http://javascriptweenie.com/articles/dynamic_doc_windows.html

Using JavaScript and forms. About 10% of the way down the page is a short section entitled: Getting a Value from a Form Object.
http://www.webreference.com/content/jssource/chap16.html

Values from form objects. There's a script half way down the page.
http://www.javaworld.com/javaworld/jw-06-1996/jw-06-javascript.html

Using JavaScript to Write JavaScript (actually it's more about JavaScript within multiple frames)
http://www.webtechniques.com/archives/1997/09/junk/

Scripts

Pass form values from one page to the next.
http://javascript.internet.com/forms/passing-values-source.html

Pass Textbox (in frames).
http://javascript.internet.com/forms/pass-textbox-frames.html

Pass Menu (in frames).
http://javascript.internet.com/forms/pass-menu-frames.html

Mousover in one frame changing an image in another frame.
http://idm.internet.com/ix/msg/22464.html


At the following irt.org site you can find further scripts:
http://www.developer.irt.org/script/form.htm#10

Examples of their scripts include

Copying multiple options from one options list to another.
http://www.developer.irt.org/script/218.htm

Copy letters from one form field to another,
http://www.developer.irt.org/script/420.htm

Set the value of a form field when a check box is selected.
http://www.developer.irt.org/script/933.htm

Pass values from one frame to another in a single frameset.
http://developer.irt.org/script/834.htm



Back to the Web Developer's Journal
Contact WDJ   •    Suits!   •    Propheads!   •    Ponytails!
Discuss   •    Subscribe   •    Search


internet.com

IT | Developer | Internet News | Small Business | Personal Technology | International | Search internet.com | Advertise | Corporate Info
Newsletters | Tech Jobs | E-mail Offers

internet.commerce
Be a Commerce Partner                                
  

JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES