You need to sign in to do that
Don't have an account?
sk3501.3915272120779841E12
how to disable button in vf page
Hi, I am using an image link inside button like given below, and want do disable button on some event but i am not able to disable this. Please help me if you know this. I need this to disable using jquery.
<<button id="btn1" type="button"><img height="16px" src="/resource/myImg" width="16px"></button>
<<button id="btn1" type="button"><img height="16px" src="/resource/myImg" width="16px"></button>
You want to disable it or you want to hide it ?
Thanks,
Sandeep
You can use disabled = " true" attribute to disable this button..
ex: <button disabled = " true"></button>
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Thanks,
Sandeep
Salesforce Certified Developer
I want to disable it using Jquery. And i am using the same disabled="true" but it is not disabling the button which contains an image. But it is only working with button only. I have written my code above. I am explaining it bit more by example: disabled="true" is working for given code
<button id="btn1" type="button"></button>
But it is not working for below given code:
<button id="btn1" type="button"><img height="16px" src="/resource/myImg" width="16px"></button>
If you have some idea then let me know.
Can you share your jquery code which you are using to disable it ?
Thanks
Sandeep
You can put alert and check first, if you are getting the dome element then we can check why it is not working..but first check with alert if you are getting the element or not..
thanks
sandeep