Forum Moderators: open
<script language='javascript'>
function change_url() {
document.location = "http://www.website.com/folder/"+form1.text1.value;
}
</script><form name='form1'>
<input type='text' name='text1' />
<input type='button' value='Go to URL' onClick='change_url()' />
</form>
Good luck!
<form name='form1' onSubmit='change_url()'>
<input type='text' name='text1' />
<input type='button' value='Go to URL' onClick='change_url()' />
</form>
I'm not an expert when it comes to javascript but I think this should do it. ;)
Good luck!
<form name='form1' onSubmit='change_url(); return false();' target="new window">
<input type='text' name='text1' />
<input type='submit' value='Go to URL' onClick='change_url()' />
</form>
This does two things. One, it should allow it to submit when you hit enter, and two, it will allow the form to still be submitted if javascript is disabled.
Which it currently will not. :-)
Of course, if that's the case, the whole thing won't work and you need to use some server-side language such as perl or php to make it work, but that's another topic.
Before that change, enter didn't work, but clicking on submit worked.. now...
I hit enter and a new window opens, but still the same page, and this is the address again "file:///C:/index.html?text1=kboi"... then the original page actually goes to the intended website... kinda weird and obviously something is wrong..
P.S. thank you guys for helping me...