tags:

views:

66

answers:

1

In my application i have three buttons, If i click on one button I have to disable all the button till the operation on that button is finished.

I dont know how to disable the other two buttons. Kindly help.

A: 

Use JavaScript to get the HTML element from the DOM and then set its disabled attribute.

document.getElementById('clientId').disabled = true;

Note that the 'clientId' is the autogenerated HTML element ID. Rightclick page and View Source to find it out. If this contains prefixes like j_id and so on, then you need to give all parent UINamingContainer components like <h:form>, <h:dataTable>, <f:subview> and so on a fixed component ID, so that the client ID doesn't need to be autogenerated anymore.

BalusC
Thanks it worked. But already gave all the Id to the buttons and the form,So i used them.
Hari