Click to See Complete Forum and Search --> : How do I pass variables to another page?


jammer20002
09-07-2003, 12:06 PM
I want to take variables in one page and pass them onto another.

How can I do this?

AND... then VERY importantly, I want to fill values in the next page with values that have been passed through
from the previous page.

How do I do this?

I've looked in several Javascript books... but... I can't seem to be able to find answers to both fo the abvoe q's.

What I want to do is create a very simple shopping cart.
I've tried a few postings... but all the answers I get are all unecessarily complex.

ANY help would be appreciated.

Thanks.


Jam

Exuro
09-07-2003, 12:28 PM
You can pass variables between pages through the query string. This is assuming that you're going between the pages through a link... If so, try something like this:

<a href="page2.htm?varName1=value1&varName2=value2&varNameN=valueN">link</a>

The query string can then be accessed through parent.location.search. If you're not sure how to do that, try reading the last few posts on this thread:

http://forums.webdeveloper.com/showthread.php?s=&threadid=15085

BestZest
09-07-2003, 03:15 PM
You may be better off using cookies for a shopping cart. I'm not to good on cookies my self, but there is a good tutorial at http://www.webmonkey.com .
Good luck,

BestZest

Jupac
09-07-2003, 03:41 PM
u can u frames but that not a good way

Exuro
09-08-2003, 11:56 PM
Oh wow, I'm sorry. I didn't read the whole post... I'm such a hypocrite :(. Anyway, I did reply to your other post, but I don't know if you noticed or not:

http://forums.webdeveloper.com/showthread.php?s=&threadid=16923

You should pretty much just be able to copy & paste that onto your page. Hope that helps!