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

input disabled

Status
Not open for further replies.

lucidtech

IS-IT--Management
Jan 17, 2005
267
US
function SameBilling() {
if (document.checkout_info.same_billing.checked == true) {
document.checkout_info.checkout_billing_address.disabled = "yes";
} else {
document.checkout_info.checkout_billing_address.disabled = "no";
}
}

The following code disables the input field, but will not re-enable it if the user unchecks the checkbox...

please help
 
I am a Newbie, but I would think that you would need to handle the event of the checkbox OnChange. Define your checked or unchecked there.

I hope this helps!
 
It is defined. This javascript function is called from the form whenever the checkbox is changed.
 
For anyone who comes across this thread later, I got it to work. Code should look like this :

document.checkout_info.checkout_billing_address.disabled=true;

or

document.checkout_info.checkout_billing_address.disabled=true;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top