SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Getting HTTP VARS
Hybrid View
-
Dec 5, 2002, 03:59 #1
- Join Date
- Mar 2001
- Location
- the Netherlands
- Posts
- 519
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Getting HTTP VARS
I have a little problem.
I want to get the variables which are passes through from one page to another.
I.e. I have a form on one page which posts (method="post") a variable 'TEST' to another page.
In the second page I want to use this variable in a form.
Can this be done, and if so: HOW?
Any help is appreciated!
Jazz
-
Dec 5, 2002, 04:54 #2
- Join Date
- Aug 2002
- Location
- Burpengary, Australia
- Posts
- 4,495
- Mentioned
- 0 Post(s)
- Tagged
- 1 Thread(s)
I don't believe that can be done with JavaScript, POST variables can only be read by a server-side language (PHP,, CFM, .NET). JavaScript can read the querystring (GET) however so maybe try that. Unfortunately I don't know how to get variables from there though
-
Dec 5, 2002, 10:34 #3
- Join Date
- Oct 2002
- Location
- Scotland
- Posts
- 3,631
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Code:theURL = location.href; if (theURL.indexOf("?") > -1) { els = theURL.split("?"); if (els.length == 1) { theQS = els[1]; } else { theQS = ""; } } else { theQS = ""; }
Bookmarks