Wednesday, March 15, 2017

Use keyboard "Enter" to function same as the custom button.

$(document).on("keypress","#txtParam",function (e) {
// Keypress event of the textbox

 var key = e.which;
 if(key == 13)  // the enter key code
  {
    $("input[id ='btnSearch']").click(); // simulates the function of "btnSearch"  button on ENTER.
    return false;
  }
});

No comments:

Post a Comment

Clearing Person/Group Values

To clear out or empty the values in person or group columns, how you do it depends on if the column is single-value or multi-value. For ...