2:58 PM
To: jQuery (English)
Subject: [jQuery] Re: submitting the form by pressing ENTER
Hi,
Unfortunately, that didn't work for me. Here was my code:
$('#pageForm').submit(function() {
var page = $('#page').val();
Hi,
Unfortunately, that didn't work for me. Here was my code:
$('#pageForm').submit(function() {
var page = $('#page').val();
if (!isInteger(page)) {
alert("The page number must be an
integer.");
You should be able to intercept that button press by using the submit()
method of the form object.
$('#myForm').submit(function(){
// this method should fire whether the button was clicked with the
mouse
// or the enter button was pressed
return false;
});
3 matches
Mail list logo