Returns the jQuery object that represents the Button object. Can be used with the standard and custom buttons the same way.
Syntax
getItemButton( itemId, recordId );
Arguments
itemId
the element ID. You can use this method only with the items (elements) that have an ID. How to find out Item ID.
recordId {integer}
(optional) record ID in a data grid on the List page.
Note: use the recordId() function of GridRow object to obtain this ID.
Return value
Returns the jQuery object that represents the Button object.
Examples
Get button object and do something with it.
// disable the button
pageObj.getItemButton('custom_button').addClass('disabled');
// enable the button that was previously disabled
pageObj.getItemButton('custom_button').removeClass('disabled');
// imitate the button click
pageObj.getItemButton('custom_button').click();
See also:
•Page Designer: Insert custom button
•JavaScript API: AJAX helper object > setDisabled()
•JavaScript API: AJAX helper object > setEnabled()
•Troubleshooting custom buttons
•JavaScript API: RunnerPage object