Having a checkbox make something available when it's checked.

M

Mufasa

I have a check box with javascript code attached to it that will allow me to
enable an 'accept' butten when the person has checked the box. The code is:

input type="checkbox" name="checkbox"
onclick="javascript:document.getElementById('ctl00$MainPage$btnToCheckout').disabled=!this.checked;
return true; " />I


The code works fine in IE - the button becomes enabled when the check box is
clicked. But if Firefox it doesn't work.

Any thoughts?

TIA - Jeff.
 
M

Mufasa

That works fine except that I'm using an ASP:Button with code behind it.
That's why the funny name.

Any thoughts on getting this to work with ASP controls?

TIA - Jeff.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top