Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-05-2002, 10:28 PM   PM User | #1
-sephiroth-
New Coder

 
Join Date: Aug 2002
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
-sephiroth- is an unknown quantity at this point
clicking transportation (passwords)

I'm looking for a code that if they click on certain links on a page they will be transported to another page...(I have a ton of links on one page and I have a password system so if their name is sumthing the links take them to a different page)
-sephiroth- is offline   Reply With Quote
Old 08-05-2002, 10:38 PM   PM User | #2
beetle
Senior Coder

 
Join Date: Aug 2002
Posts: 3,467
Thanks: 0
Thanked 0 Times in 0 Posts
beetle has a little shameless behaviour in the past
How does your password system work?
beetle is offline   Reply With Quote
Old 08-05-2002, 10:40 PM   PM User | #3
-sephiroth-
New Coder

 
Join Date: Aug 2002
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
-sephiroth- is an unknown quantity at this point
they type in a username and password which takes them to the page they wanted to go to...hard to explain
-sephiroth- is offline   Reply With Quote
Old 08-05-2002, 10:47 PM   PM User | #4
beetle
Senior Coder

 
Join Date: Aug 2002
Posts: 3,467
Thanks: 0
Thanked 0 Times in 0 Posts
beetle has a little shameless behaviour in the past
So the username and password are available as GET variables? Or is the form POST? (i.e. does form create a query string?) Because javascript can't directly access POSTDATA. You would need something like PHP to do that. Or use cookies....
beetle is offline   Reply With Quote
Old 08-05-2002, 10:48 PM   PM User | #5
-sephiroth-
New Coder

 
Join Date: Aug 2002
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
-sephiroth- is an unknown quantity at this point
they're in get variables
-sephiroth- is offline   Reply With Quote
Old 08-05-2002, 11:09 PM   PM User | #6
beetle
Senior Coder

 
Join Date: Aug 2002
Posts: 3,467
Thanks: 0
Thanked 0 Times in 0 Posts
beetle has a little shameless behaviour in the past
Great! Then lets do this:
Code:
<script>
var qString = top.location.search;
qString = unescape(qString.substring(1));
var getVars = qString.split(/[\&]/);
var pageVars = new Array();
for (var j in getVars)
	{
	var temp = getVars[j].split(/[=]/);
	pageVars[j] = temp[1];
	}
</script>
Now you have an array, pageVars that holds the value of each of the get variables (in sequence of appearance). Do you think this will work for you?
beetle is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:17 AM.


Advertisement
Log in to turn off these ads.