...

View Full Version : Simple login/pw redirect please help



inalilbubble
10-19-2005, 12:24 AM
I want to add to a website the feature that a client can access a particular page for ex. They would enter their job i.d. number and be redirected to their job. If they're job I.D. number is 1776 then the page it would redirect to would be 1776.html -- Sounds simple enough but I cant find a script that'll do this. Any help would be greatly appreciated. Thanks!

_Aerospace_Eng_
10-19-2005, 12:28 AM
You do know that with javascript anyone who enters the correct id would be taken to the page they entered?

inalilbubble
10-19-2005, 12:31 AM
No I didnt, are you telling me that by entering the page file name (ex. 1776) they would be redirected to 1776.html? Because thats exactly what Im looking for. :o| Novice at Java

_Aerospace_Eng_
10-19-2005, 12:43 AM
Yes that is what I'm telling you but anyone would be able to view it. Note java is not javascript.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<script type="text/javascript">
function goTo(){
var thego=document.forms[0].thego.value;
window.location='http://www.yoursite.com/'+thego+'.html';
return false;
}
</script>
</head>

<body>
<form action="#" onsubmit="return goTo()" method="post">
<input type="text" name="thego">
<input type="submit" value="Go">
</form>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum