Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old October 3rd, 2006, 03:05 PM
Garry Jones
Guest
 
Posts: n/a
Default Checkbox problem

I have a form with 6 checkboxes.

If the user clicks the first checkbox I want the other five to be
automatically checked.

I am aware of form checkbox properties "parent, sibling and child" and
suspect that the answer lies therin but have not been able to google my way
to a website with adequate instrictions on how to use these. Gratefull for
any help. Thanks

Garry Jones
Sweden


  #2  
Old October 3rd, 2006, 03:35 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: Checkbox problem

Garry Jones wrote:
Quote:
I have a form with 6 checkboxes.
>
If the user clicks the first checkbox I want the other five to be
automatically checked.
>
I am aware of form checkbox properties "parent, sibling and child"
Your awareness is flawed. There's no such thing.
Quote:
and
suspect that the answer lies therin but have not been able to google my way
to a website with adequate instrictions on how to use these. Gratefull for
any help. Thanks
You have to use Javascript, and you should also take into account the
possibility that your users may not have Javascript turned on.

  #3  
Old October 3rd, 2006, 09:45 PM
Sandy.Pittendrigh@gmail.com
Guest
 
Posts: n/a
Default Re: Checkbox problem


for instance:

function cbxer(name)
{
if(name == \"dryfly\" &&
document.forms[0]['dryfly'].checked)
{
document.forms[0].wetfly.checked=false;
document.forms[0].larvae.checked=false;
document.forms[0].pupae.checked=false;
document.forms[0].streamer.checked=false;
document.forms[0].beadhead.checked=false;
document.forms[0].nymph.checked=false;
}
......etc
}

  #4  
Old October 3rd, 2006, 11:15 PM
Garry Jones
Guest
 
Posts: n/a
Default Re: Checkbox problem

Garry Jones said
Quote:
Quote:
>"I am aware of form checkbox properties "parent, sibling and child"
"Harlan Messinger" replied
Quote:
Your awareness is flawed. There's no such thing.
Thanks for letting me know that this. I tested a lot with the "parent,
sibling and child properties" listed at Microsoft for "input type=checkbox"

Such properties are listed
nextSibling
canHaveChildren
offsetParent

at
http://msdn.microsoft.com/library/de..._checkbox.aspa

This is not what I was looking for as you pointed out.

Thanks for your help. By the way as java is not always turned on I fixed it
with a "form before form" solution, the user chooses one of two radio button
on form 1 which implies intention and is then taken to the appropiate
"single check box" or "multi check box" form.

Best Wishes
Garry Jones
Sweden





<hmessinger.removethis@comcast.netskrev i meddelandet
news:4ofbl6Fe0ghiU2@individual.net...
Quote:
Garry Jones wrote:
Quote:
>I have a form with 6 checkboxes.
>>
>If the user clicks the first checkbox I want the other five to be
>automatically checked.
>>
>
>
Quote:
>and suspect that the answer lies therin but have not been able to google
>my way to a website with adequate instrictions on how to use these.
>Gratefull for any help. Thanks
>
You have to use Javascript, and you should also take into account the
possibility that your users may not have Javascript turned on.
>

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles