Triminds - Enable and Disable | HTML Goodies

Triminds – Enable and Disable

Written By
Vince Barnes
Vince Barnes
Jan 4, 2005
1 minute read


Authors: Jacob Holderman & Jonas Holderman
of Triminds, Inc.


Step 1: Design a form look include a text box,
check box, and buttons.

name="">

name="">

name="" value="ON">

 


Step 2: Give the form and the input types a name.
*Very Important*

name="formname">

name="textname">

name="checkboxname"
value="ON">

Step 3: Add the onclick tag in the checkbox.
Make the value
"codename()". *Very Important*

name="formname">

name="textname">

name="checkboxname" value="ON">

Step 4: Now we want to make the text box disabled.
Add the disabled in the
text box.

name="formname">

size="10"
name="textname">

onclick="codename()"
name="checkboxname" value="ON">

Step 5: Now we need to enable it with the checkbox using a
small java script. Add the following code
above the form. The script is case sensitive meaning you can only use lowercase.

 

name="formname">

name="textname">

onclick="codename()"
name="checkboxname" value="ON">

 


 

This code is also useful when you don’t want to
send empty
values. It allows you have a option.

Example:  using form method GET (http://www.host.com/index.asp?formname=&checkboxname=ON)
without code

Example:  using form method GET
(http://www.host.com/index.asp?)
with


Back to the HTML Goodies Home Page


HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.