Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
CheckBox
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
java.i...@gmail.com  
View profile  
 More options May 24 2007, 4:27 am
Newsgroups: comp.lang.javascript
From: java.i...@gmail.com
Date: 24 May 2007 01:27:05 -0700
Local: Thurs, May 24 2007 4:27 am
Subject: CheckBox
HI

how to select only one check box in two checkboxes like radio buttons


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Darko  
View profile  
 More options May 24 2007, 12:31 pm
Newsgroups: comp.lang.javascript
From: Darko <darko.maksimo...@gmail.com>
Date: 24 May 2007 09:31:10 -0700
Local: Thurs, May 24 2007 12:31 pm
Subject: Re: CheckBox
On May 24, 10:27 am, java.i...@gmail.com wrote:

> HI

> how to select only one check box in two checkboxes like radio buttons

Take a book on Javascript and English language, syntax and grammar,
then try it again and if you don't succeed, then come back here and
ask the question again, but with more details on what your problem is
(not only what you want to do even if you haven't tried it yourself)

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evertjan.  
View profile  
 More options May 24 2007, 12:56 pm
Newsgroups: comp.lang.javascript
From: "Evertjan." <exjxw.hannivo...@interxnl.net>
Date: 24 May 2007 16:56:38 GMT
Local: Thurs, May 24 2007 12:56 pm
Subject: Re: CheckBox
Darko wrote on 24 mei 2007 in comp.lang.javascript:

> On May 24, 10:27 am, java.i...@gmail.com wrote:

>> how to select only one check box in two checkboxes like radio buttons

> Take a book on Javascript and English language, syntax and grammar,
> then try it again and if you don't succeed, then come back here and
> ask the question again, but with more details on what your problem is
> (not only what you want to do even if you haven't tried it yourself)

The OP could be right:

That one in two checkboxes do like radio buttons.

Don't you love them?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Johns  
View profile  
 More options May 24 2007, 4:39 pm
Newsgroups: comp.lang.javascript
From: Jeff Johns <phpf...@gmail.com>
Date: 24 May 2007 13:39:41 -0700
Local: Thurs, May 24 2007 4:39 pm
Subject: Re: CheckBox
On May 24, 12:56 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
wrote:

HTML
<input type="checkbox" name="test" id="test" value="1"
onclick="check_it(this);" />
<input type="checkbox" name="test" id="test1" value="2"
onclick="check_it(this);" />

SCRIPT
function check_it(obj)
{
    if (this.id == 'test' && this.checked) {
         document.getElementById('test1').checked = false;
    }
    elseif (this.id == 'test1' && this.checked) {
         document.getElementById('test').checked = false;
    }

}

This is just a very simple way to do it.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
-Lost  
View profile  
 More options May 24 2007, 5:43 pm
Newsgroups: comp.lang.javascript
From: -Lost <maventheextrawo...@techie.com>
Date: Thu, 24 May 2007 17:43:21 -0400
Local: Thurs, May 24 2007 5:43 pm
Subject: Re: CheckBox

Too bad it doesn't work as is.

All instances of "this" in your "SCRIPT" block should be "obj".

Also, there is no such thing as an "elseif" in JavaScript.  You meant
"else if".

--
-Lost
Remove the extra words to reply by e-mail.  Don't e-mail me.  I am
kidding.  No I am not.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Johns  
View profile  
 More options May 25 2007, 11:10 am
Newsgroups: comp.lang.javascript
From: Jeff Johns <phpf...@gmail.com>
Date: 25 May 2007 08:10:05 -0700
Local: Fri, May 25 2007 11:10 am
Subject: Re: CheckBox
On May 24, 5:43 pm, -Lost <maventheextrawo...@techie.com> wrote:

Indeed, sorry for the confusion.

Here this works:

SCRIPT
function check_it(obj)
{
    if (obj.id == 'test' && obj.checked) {
         document.getElementById('test1').checked = false;
    }
    else if (obj.id == 'test1' && obj.checked) {
         document.getElementById('test').checked = false;
    }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »