Forum

July 12th, 2025
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
single search submit on enter
23/09/2011
02:37
Avatar
erreth
Member
Members
Forum Posts: 3
Member Since:
21/09/2011
sp_UserOfflineSmall Offline

Hello,

I'm  trying to figure out how to have my single search form submit when the enter button is pressed.  I've found several posts regarding this, but the code doesn't work for me.  I've tweaked the code I found, as seen below.  But this code doesn't work properly.  It seems that when I press the enter key, the form is submitted as if there was nothing entered in the value field.  If I manually press the search button with the mouse pointer, it submits fine, but the jquery .click() method doesn't submit it properly, for whatever reason.  I was hoping one of you might be able to give me some pointers here.  Thanks!

Edit:  The weird thing is, if I put an alert right before the .click() event, the alert pops up and the search works properly.  But without the alert, just a '0' is submitted...

beforeShowSearch: function(form){

    $('input', form).keydown(function(e) {

        if (e.keyCode == 13) {

            $("#fbox_cust_grid_search").click();

        }

    }

},

onClose: function(form){

    $(form).unbind('keydown');

}

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information