Ok, I have a page using frames like:
| | |
| | |
| | |
| | |
|____________ | |
| | |
|_____________|_____|
Well you get the drift :)
In the bottom frame I have a form, well I say form, it is like this:
<form name="post">
<input type="text" name="message" class="text" size="80">
<input type="button" value="Post" class="button" onclick="post_me(post.message.value);">
</form>
....now, currently if you try to submit the form by hitting return, it reloads the main frame in the bottom frame.
Does anyone know how I can get "return" to submit the form (well basically it just needs to call the post_me() function.
Do I need an "onLoad" event in the body tag or something like that to detect the keypress?
I've tried using:
if (window.event.keyCode == 13) {
...but can't get it to work :(
Code:
____________________ | | |
| | |
| | |
| | |
|____________ | |
| | |
|_____________|_____|
Well you get the drift :)
In the bottom frame I have a form, well I say form, it is like this:
<form name="post">
<input type="text" name="message" class="text" size="80">
<input type="button" value="Post" class="button" onclick="post_me(post.message.value);">
</form>
....now, currently if you try to submit the form by hitting return, it reloads the main frame in the bottom frame.
Does anyone know how I can get "return" to submit the form (well basically it just needs to call the post_me() function.
Do I need an "onLoad" event in the body tag or something like that to detect the keypress?
I've tried using:
if (window.event.keyCode == 13) {
...but can't get it to work :(