PDA

View Full Version : Help with redirecting HTML form, usure what to do next!



bengaskell
07 Jul 2006, 08:53 PM
Hello people.

I have this script designed when text is enter into the form and submit is pressed the page redirects to 'text-in-box'+.html. The script seems to work locally but online returns Server Error 500. I've checked the CHMOD but now it's beyond my skills. Anyone else with a better clue, help is much appreciated!

The Script:

<form action="http://www.a51net.com/login/#.htm"
method="post" onsubmit="return AdJump()">
<p align="center">&nbsp;<input id="adnum" type="text" value size="4" maxlength="4">
<br>
<input type="submit" value="Login" style="color: #FFFFFF; font-family: Verdana; font-size: 8pt; font-weight: bold; border: 1px solid #4A94DE; background-color: #4A94DE">
</p>
</form>

Cheers for reading!

BEN.

bengaskell
08 Jul 2006, 12:07 PM
Me again.

Weird, but I'm solving this one myself. For anyone who wants the answer or the script to do this, this has been tested and works:

<script type="text/javascript">

function AdJump()
{
window.location = 'http://www.a51net.com/login/'+ document.getElementById('adnum').value +'.html';
return false;
}
</script>

<form action="http://www.a51net.com/login/#.htm"
method="post" onsubmit="return AdJump()">
<p align="center">&nbsp;<input id="adnum" type="text" value size="4" maxlength="4">
<br>
<input type="submit" value="Login" style="color: #FFFFFF; font-family: Verdana; font-size: 8pt; font-weight: bold; border: 1px solid #4A94DE; background-color: #4A94DE">
</p>
</form>

Well, there you go!

BG