SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Hybrid View
-
Jul 25, 2006, 01:52 #1
- Join Date
- Jul 2006
- Posts
- 3
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
more than one checkbox not be selected
Hai all, I am having a jsp page where i had some entries and a checkbox for each entry. Any user has to select one of the checkboxes and click the download button. This is working fine. But if more than one checkbox is selected, the download button should be disabled. I know that it is a bit of javasript stuff but am not getting it right. so please help me in this regard.
Thanks in advance.....
-
Jul 25, 2006, 02:53 #2
- Join Date
- Jun 2004
- Location
- Mumbai, India
- Posts
- 541
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hey Jaya in this case why don't you use the radio button
that will be simpler option.Vikrant Korde
S Y S T I M E, Mhape,
Mumbai, Maharashtra, India.
-
Jul 25, 2006, 03:17 #3
- Join Date
- Jul 2006
- Posts
- 3
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi, in this case we dont have only the download button but we have the delete button and such other buttons where a user can select more than one option. So we opted for the checkbox. He has to select only option when it comes to downlad button only, Can u suggest another solution...
-
Jul 25, 2006, 03:33 #4
u might use some logic like when user checks multiple checkboxes then automatically disable the download button and whatever button u like once user click only one check box ur code should enable both download or delete button
Last edited by sajjad; Jul 26, 2006 at 21:54.
-
Jul 25, 2006, 03:53 #5
- Join Date
- Jul 2006
- Posts
- 3
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes sajjad, u r right? Thts wat i have been trying but i cant get any right idea for this approach. I am weak in javascript but i need a solution so fast. So if u can please give me an idea of how to start coding for this part. Once i get an idea i can implement it....
Thanks..........
-
Jul 25, 2006, 04:20 #6
dear,
it's so simple. i'll let u know how to do that.
first of all make array of checkboxes.
take length.
u can take one counter variable with that.
u need to check how many checkboxes are checked while looping and inside this loop u can set counter value.
suppose user have checked 2 checkboxes then this counter has value 2
now after that u need to check if counter value is greater than or equals 2 then u should disable the download button other wise enable it.
i think u understand all this
Bookmarks