whoknowswhat
12-22-2007, 10:20 PM
Hello,
I found this thread here (http://www.dynamicdrive.com/forums/showthread.php?t=9474)
And I am wanting something just a little different.
The code I have is as follows
<head>
<script type="text/javascript" src="num.js"></script>
</head>
<body>
<form action="" method="get" onsubmit="this.action = 'http://www.graceservicesgroup.com/' + this.elements['code'].value.toLowerCase() + '.html'; return true;">
<fieldset>
<legend>Code entry form</legend>
<input type="text" name="code" id="code" size="15">
<label for="code">Enter Code:</label>
<input type="submit" value="Submit">
</fieldset>
</form>
</body>
This is just the example code from the thread above with my own url as well as my script.
What I am looking to do is take the form data and compare it to a javascript that contains the links and their code. Then have the link associated with the form entry to be returned and then redirect to the returned link.
The desired output is that if 0 is entered and submitted it will redirect the user to http://support.graceservicesgroup.com/
And other numbers to other places, such as the homepage or a promotional page.
Any assistance is greatly appreciated!
I found this thread here (http://www.dynamicdrive.com/forums/showthread.php?t=9474)
And I am wanting something just a little different.
The code I have is as follows
<head>
<script type="text/javascript" src="num.js"></script>
</head>
<body>
<form action="" method="get" onsubmit="this.action = 'http://www.graceservicesgroup.com/' + this.elements['code'].value.toLowerCase() + '.html'; return true;">
<fieldset>
<legend>Code entry form</legend>
<input type="text" name="code" id="code" size="15">
<label for="code">Enter Code:</label>
<input type="submit" value="Submit">
</fieldset>
</form>
</body>
This is just the example code from the thread above with my own url as well as my script.
What I am looking to do is take the form data and compare it to a javascript that contains the links and their code. Then have the link associated with the form entry to be returned and then redirect to the returned link.
The desired output is that if 0 is entered and submitted it will redirect the user to http://support.graceservicesgroup.com/
And other numbers to other places, such as the homepage or a promotional page.
Any assistance is greatly appreciated!