• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Opera submits form on enter Explorer dont ?

 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I call a javascript from a input field, the only thing this javascript does is alert("FRANK");

When i type ok in the box, IE dont submit the form, Opera submits the form...

I dont want to submit the form, do anyone noes what to do about this ???

Frank


[ August 23, 2005: Message edited by: Bear Bibeault ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to see the code that you are using?

Eric
 
Garann Means
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want to submit the form, don't specify an action for it and add onsubmit="return false;" to the form tag.
 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code is this:



In IE and Firefox nothing happens when i hit the enter buttom, in this field, in Opera, the form is automaticly submitted ???

I have other fields that must be submitted on enter !

I can maybe code a function that teturn something like this:

return !(window.event && window.event.keyCode == 13);

but is this nessesary ???

Frank
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick question, is there only one text field in the form?

Eric
 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no there are 3 input fields !


Frank
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic