Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > JavaScript API > RunnerPage object > Methods

JavaScript API:RunnerPage object>getItemButton( itemId,recordId)

Scroll Prev Next More

 

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

Button object

JavaScript API: AJAX helper object > setDisabled()

JavaScript API: AJAX helper object > setEnabled()

Events: JavaScript onload

Troubleshooting custom buttons

JavaScript API: RunnerPage object

JavaScript API

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software