Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

The JavaScript FAQ
Prev Home Next

Passing parameters to a page

Question: Can I pass parameters from one my page to another?

Answer: Yes, you can pass a parameter to another page in several different ways:

  • by storing the parameter in a cookie
  • by storing the parameter in a variable of another window or frame
  • by storing the parameter in the rewritable property top.name (the browser window name)
  • by appending the parameter to the destination page's URL as a query string
Here is a simple demo illustrating all these methods for passing parameters. The value to be passed is the string 'It_worked'. When you click on the button below, the button's event handler script stores the parameter (1) in a cookie named parm_value, (2) in a top-level variable top.parm_value, and (3) in the top.name property. Then the script directs your browser to the URL parm_get.htm appended with a query string containing the URL-encoded parameter value.

JavaScripter.net. Copyright © 1999-2006, Alexei Kourbatov

The JavaScript FAQ
Prev Home Next


 
 
  Mirrored with kind permission of Alexei Kourbatov Design by Interspire