
Originally Posted by
Twey
Ah, sorry, I failed to return false:
Code:
<form onsubmit="window.frames['frame_name'].location.href = this.elements['url'].value; return false;">
<label>Url:
<input name="url" type="text" size="100">
</label>
<label>
<input name="go" type="submit" value="Go">
</label>
</form>
If it's vital to the operation of your site, remember to provide server-side backup.
Hey, thanks for trying but it wouldn't work. =/
However, I found the code that I was talking about. It works, but now I can't figure out how to open it inside my frame. I tried putting target attribute everywhere inside form but no luck. I think it has to be inside JS code somewhere.
Can anyone help me out on this?
Code:
<form name="jumpurl1" onSubmit="return jumpit()">
<input type="text" size=30 name="jumpurl2" value="http://">
<input type="button" value="Go!" onClick="jumpit()">
</form>
<script>
function jumpit(){
window.location=document.jumpurl1.jumpurl2.value
return false
}
</script>
thanks,
v1k
Bookmarks