#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    14
    Rep Power
    0

    Checking checkboxes


    Hi,


    I'm writing a form to allow students to select papers - however, students may only take a maximum of 8 and so once 8 boxes have been checked, I'd like the rest to be disabled, but I'm not sure how to do this. I presume the best way to prevent the same paper being taken in different semesters is to group them so that only one of the group can be checked at any given time (is this the same with checkboxes as with radio buttons?), but I'm not sure how to keep track of the total boxes that have been checked to ensure that students cannot enrol for more than 8 classes. Can anyone help?


    Thanks,

    Fiona
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    Have you tried using the javascript event handlers? Run a check after each click box to ensure only eight boxes have been checked.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    14
    Rep Power
    0
    Thanks; I'm not actually very familiar with javascript, but I assume this would act like an ActionListener?


    Fiona
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    No es importante
    Posts
    2,065
    Rep Power
    14
    Are you referring to Java actionListener? Yes, the event handlers are similar to those.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    14
    Rep Power
    0
    Yes, I'm thinking of the java ActionListener/EventListener classes. I've done a fair bit with java, am now getting into jsp but don't have any experience with javascript - but it sounds like what I need, ta.


    fiona

IMN logo majestic logo threadwatch logo seochat tools logo