faqts : Computers : Programming : Languages : JavaScript : Forms : Buttons

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

50 of 94 people (53%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

how to make a button invisible on certain event ?

Jul 21st, 2002 14:02
Adrian Simpson, manish kumar,


Well I guess you know how to trigger your code. the code you need is 
quite simple. If the button was called say magicB and was in a form 
called Form. you would call the command
document.forms.form.magicB.style.addRule('visibility', 'hidden');
You may need a style attribute in the button tag to begin with but I 
don't think so. The opposite of hidden would be visible. 
hope this helps
Adrian