SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: Javascript Querystrings
-
Jan 28, 2003, 15:21 #1
- Join Date
- Jun 2002
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Javascript Querystrings
Is there a way to read a querystring with javascript? How do i do this?
Also can javascript get the url in the address bar of the browser of the current page you are on.
If anyone can help me out with this i would appreciate it. I have been looking for these and so far i am unable to lacate what i need.
Thanks
n3uraiKeep It Real
-
Jan 28, 2003, 17:56 #2
- Join Date
- May 2002
- Location
- United States
- Posts
- 457
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
something like this perhaps??
PHP Code:// Assuming URL is something like:
// [url]http://www.domain.com?name=John[/url]
var URL = new String(parent.document.location);
var item = URL.split("?");
var single = item[1].split("=");
single[0] = name
single[1] = fname
Thread looks very useful!!Compwizard
"There are 10 kinds of people in this world -- those who know binary, and those who don't."
Bookmarks