This topic is locked
[SOLVED]

 Want to use enter instead of save button (add record)

6/30/2019 7:13:20 AM
PHPRunner General questions
U
unp author

Phprunner 9.8
Under Add Page: JavaScript Onload event:
$(document).keyup(function(e) {

if (e.keyCode == 13)

{

$("input[id^='saveButton']").trigger('click');

}

});
But it did not work.

What can I do???????
Normann

Sergey Kornilov admin 6/30/2019

Your code is mostly correct but since this is not an input but a you need to change it accordingly.

$(document).keyup(function(e) {

if (e.keyCode == 13)

{

$("a[id^='saveButton']").trigger('click');

}

});
U
unp author 6/30/2019



Your code is mostly correct but since this is not an input but a you need to change it accordingly.

$(document).keyup(function(e) {

if (e.keyCode == 13)

{

$("a[id^='saveButton']").trigger('click');

}

});



Thank's that works :-)