www.webdeveloper.com
Results 1 to 10 of 10

Thread: validation help please

  1. #1
    Join Date
    Oct 2009
    Posts
    26

    validation help please

    document.form.Reserveteam.value.

    This gives a team from a drop down box. 24 teams

    Next I have a checkbox list where they can select three teams.

    I need to check if the Reserveteam.value has been selected again.

    Doing my head in!

  2. #2
    Join Date
    May 2010
    Posts
    213
    Like this: http://turcin.net/javascript/compare...-dropdown.html ?
    I suppose that checking if only three options, and not more, are selected is something you already have settled?

  3. #3
    Join Date
    Oct 2009
    Posts
    26

    Smile sorted well done

    That will do, cheers. Should be able to adapt that to my needs. Yes I already have a check for not 3 teams.

  4. #4
    Join Date
    Jun 2007
    Posts
    667
    Quote Originally Posted by peterfc2 View Post
    document.form.Reserveteam.value.

    This gives a team from a drop down box. 24 teams

    Next I have a checkbox list where they can select three teams.

    I need to check if the Reserveteam.value has been selected again.
    It would be better just to disable the corresponding checkbox.

  5. #5
    Join Date
    Oct 2009
    Posts
    26

    ok

    I did think of that but am not to hot with javascript. If your offering a solution feel free please

  6. #6
    Join Date
    Oct 2009
    Posts
    26
    Quote Originally Posted by peterfc2 View Post
    That will do, cheers. Should be able to adapt that to my needs..
    can you add a check to check that 3 teams have been selected please be easier than adapt my script

  7. #7
    Join Date
    May 2010
    Posts
    213
    Quote Originally Posted by peterfc2 View Post
    can you add a check to check that 3 teams have been selected please be easier than adapt my script
    Is this request going towards me?

  8. #8
    Join Date
    Oct 2009
    Posts
    26
    yes please if you could

  9. #9
    Join Date
    Oct 2009
    Posts
    26
    Quote Originally Posted by Sterling Isfine View Post
    It would be better just to disable the corresponding checkbox.
    disabled="true"

    Could an onchange event after the reserveteam has been selected to trigger this please.

    How could I just use this against the Reserveteam.value that matches the same team in the ckeckbox list. Would this just stop the reserve team not to be able to be selected.

  10. #10
    Join Date
    May 2010
    Posts
    213
    Quote Originally Posted by peterfc2 View Post
    yes please if you could
    I already forgot about this. If you still need it, here is the final function.
    http://turcin.net/javascript/compare...-dropdown.html

    I dunno if it works in other browsers than Firefox, because I don't have them, so you better check that out.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles