PDA

View Full Version : Sending a variable to linked page


junkmail
05-05-2003, 01:13 PM
Hey...
I am curious and in need to know if there is a possible way {without using frames} to send a variable to a specified link and the linked page will recieve the variable itself or as another variable and display it in the linked page.
Is it possible to do like ASP; send the variable's value to another page and recieve the sent value on the linked page and use it.
I would appretiate any help
Thank you...:rolleyes:

requestcode
05-05-2003, 01:20 PM
You can send a value through the URL like this:
<a href="sompage.html?some_value">Click Me</A>

And then on somepage.html you can grab that value and place it in a variable like this:
var passdata=unescape(location.search.substring(1,location.search.length))

the variable passdata would now contain the value "some_value"

Also here is a link to a tutorial on the subject:
http://www.javascriptkit.com/javatutors/send1.shtml

junkmail
05-06-2003, 03:22 AM
Thanks Alot for you help....
I really appretiated...