Reply
checkbox must be ticked to enable another input? how do i do it
Old 09-20-2007, 03:35 PM checkbox must be ticked to enable another input? how do i do it
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 6,284
Name: Dan
Location: Swindon
hi,

i would like to have a thing with tickbox input, and only if the input has been ticked do i want the input to be enabled.

fairly simple, but i am not a javascripter so how do i do it

TP for gd answer(s)
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
When You Register, These Ads Go Away!
Old 09-20-2007, 03:47 PM Re: checkbox must be ticked to enable another input? how do i do it
whym's Avatar
Putting food on my family

Posts: 3,429
Name: Daniel
Location: A sleepy town in Mid Wales
Does these help in any way?

http://codingforums.com/archive/index.php?t-1780.html
http://www.thescripts.com/forum/thread152745.html
__________________
Whym Web Design - article blog| Personal blog

I need your help - sponsor me!

Last edited by whym : 09-20-2007 at 03:48 PM.
whym is offline
Reply With Quote
View Public Profile Visit whym's homepage!
 
Old 09-20-2007, 03:58 PM Re: checkbox must be ticked to enable another input? how do i do it
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
<input type="checkbox" name="checked_field" onclick="toggleInput(this)" ondblClick="toggleInput(this)" />
function toggleInput (field) {
if (field.checked) {
your_form.your_field.disabled = false;
} else {
your_form.your_field.disabled = true;
}
}
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 09-20-2007, 04:36 PM Re: checkbox must be ticked to enable another input? how do i do it
dansgalaxy's Avatar
Eat, Sleep, Code

Posts: 6,284
Name: Dan
Location: Swindon
im assuming if i followe dthat my <form name="your_form"> and <input name="your_field"> yrea?
__________________
Personal UK Webhosting
Get 25% of ANY shared package for life ~ Promo: webmaster-talk (only for members!)
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 09-20-2007, 07:45 PM Re: checkbox must be ticked to enable another input? how do i do it
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
You got it.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to checkbox must be ticked to enable another input? how do i do it
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 10.12485 seconds with 12 queries