Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Passing variables from one page to another
- From: lists at dwsasia.com (Peter Lauri)
- Subject: [Javascript] Passing variables from one page to another
- Date: Wed Dec 27 12:49:08 2006
Why do you say that it require that the "user do something"? Check onbeforeunload() that probably can handle whatever you want "user to do". Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -----Original Message----- From: javascript-bounces@xxxxxxxxxx [mailto:javascript-bounces@xxxxxxxxxx] On Behalf Of tedd Sent: Wednesday, December 27, 2006 7:34 PM To: [JavaScript List] Subject: RE: [Javascript] Passing variables from one page to another At 10:06 AM -0800 12/27/06, Ian Skinner wrote: >I'm trying to see how js can pass variables from one web page to another. > > >From what I've read, it appears that I can attach a variable to a >window.parent. > >In my mind you are talking about two different things here. When >talking about window.parent, ect one is talking about windows opened >by other code. So a popup of some sort opened by JS in the parent >which then can pass data back to the window that created it. > >But when talking about passing variables from one web page to >another, I picture from one request to another. This requires using >something like cookies, get and|or post headers. > >Ian Skinner >Web Programmer Ian: Granted my thinking at the moment is a bit fuzzy -- I may not need, or want window.parent, but from what I've read, it looked like a possibility. So, let me back up and see if there is another way. There are several ways that I can pass variables between pages in php, such as to use sessions or cookies, but those are required because the operations are server-side and thus stateless. I know that I can pass variables back and forth between js and php, but those are problematic and require the user to do something, I don't want the hassle. What I want is a way for javascript (client-side) to pass variables from one web page to another. It seems to me that a client-side operation should be able to provide for this. For example, if I declare var a=1; in the index page (init on load), then how can I find out what it's value is in the contact page? Or is my thinking here too fuzzy? tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com _______________________________________________ Javascript mailing list Javascript@xxxxxxxxxx https://lists.LaTech.edu/mailman/listinfo/javascript
- Follow-Ups:
- References:
- Prev by Date: [Javascript] Passing variables from one page to another
- Next by Date: [Javascript] For the birds
- Previous by thread: [Javascript] Passing variables from one page to another
- Next by thread: [Javascript] Passing variables from one page to another
- Index(es):