Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie question disabling a Button

Status
Not open for further replies.

SwapSawe

Programmer
Apr 24, 2001
148
US
Can we disable a button in HTML depending on a condition?

Regards,
SwapSawe :cool:
 
yes
in ie simply add "disabled" (document.formname.butonname.disable or document.formname.butonname.disabled = true, check in your doc)
in netscape you can either make it have no effect or (if it is in a named div) hide it - or other not very clean solution
 
yea, & for cross-browser issue there is a kristof's faq in javascript forum on this subject faq216-1048, the only thing is that that faq is about checkboxes, but you can apply this disabling to a button (if you don't know how to change handlers check out my faq on this: faq216-1063)

Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top