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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to hide/disable a button on a form 2

Status
Not open for further replies.

anto2

Programmer
Apr 4, 2001
29
IE
Hello I have searched for an answer on this it's probably there somewhere.

I have a one button form
<form><INPUT TYPE=&quot;button&quot;, name=&quot;go_update&quot; value=&quot;Re-Submit&quot; onclick=&quot;do_update()&quot;></form>

and depending on other values I need to hide or disable this button. Is there any way to do do this.

Thanks
Anto2
 
Hi Anto2,
Yes you can disable the button. I can't tell in what context you need it in, and I can't find the exact syntax, but maybe this will point you in a good direction! You can use document.forms[0].elements[0].disabled = true. Where forms[0] is the first form on the page and elements[0] is the first element in the form. The only part I'm fuzzy on is the disabled=true part. Maybe you can find the exact syntax based on this little piece of info. good luck!

Thessa
 
Hello Thessa,

That worked fine.

Thank you.
Anthony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top