...

View Full Version : clicking transportation (passwords)



-sephiroth-
08-05-2002, 10:28 PM
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)

beetle
08-05-2002, 10:38 PM
How does your password system work?

-sephiroth-
08-05-2002, 10:40 PM
they type in a username and password which takes them to the page they wanted to go to...hard to explain

beetle
08-05-2002, 10:47 PM
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....

-sephiroth-
08-05-2002, 10:48 PM
they're in get variables

beetle
08-05-2002, 11:09 PM
Great! Then lets do this:
<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?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum