NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Stu on October 29, 2013, 09:16:18 PM
-
Hey Bruce/Folks,
Nettalk 7.28, Clarion 8 (last)
Have got a memory form. The memory form has the save button removed.
There is a custom button on the form, with "Default" ticked.
When I have filled out the fields on the form, on the last field, I'd like to be able to click ENTER and the Default button to be "accepted".
Any chance either I've missed something, making a mistake OR that this could be done?
-
can you make a small example I can play with?
I'm not sure if it's possible - but I'll give it a go.
cheers
Bruce
-
Stu,
If i understand what you're asking, we use this on some jQuery dialogs to handle that:
var enterKeyHandler = function(formId, btnText) {
$(formId).keypress(function(e) {
if (e.keyCode == $.ui.keyCode.ENTER) {
$(":button:contains('"+btnText+"')").trigger("click");
return false;
}
});
};
Larry Sand
-
Thanks Gents.
Bruce .. Will do so if/when I can't work out a different issue which made me not use the Save button instead of a custom button!
Larry .. Nice! Thanks very much, cool beans.