+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    May 2004
    Posts
    4

    web form selection javascript help

     
    Greetings all, I am a really newbie to javascripting (I know very little about it, but I wish to learn)

    This is what I hope to accomplish:

    A form with three selection sections.

    Section A: 4 selectionboxes that has an optionlist with 16 entries. If one is selected in the first box, that selection should not be available in the second selectionbox, and so on...

    Section B: Two selectionboxes that gets their optionlist from the selections made in Section A, again: if one is selected, it should not be available in the next selectionbox.

    Section C: One selectionbox that gets its optionlist from the two selections made in Section B.

    Can someone lead me into the right path?

  2. #2
    ph34r t3h g04t Whir's Avatar
    Join Date
    Oct 2001
    Location
    Kingsford, MI
    Posts
    29,235
    Blog Entries
    7
    Will the lists in the selection boxes be static, or be taken from a database?

    Do you know how to make the list boxes already, or are you looking for someone to show you how to code the entire thing?

  3. #3
    Junior Member
    Join Date
    May 2004
    Posts
    4

    I am a newbie, yes...

    The list in the first 4 selectionboxes should be static, could either come from an array or from a database... the two next selectionboxes should get its option values from the selections made in the first 4, and the last selectionbox should get its values from the two previous boxes... If I change in the first 4, the available selections for the other boxes should change...

    but I know how to make a form and selectionboxes... what I am having problems with is to make a script that lets me get values from previous selectionboxes and put them as available selections
    Last edited by elfranger; May 21st, 2004 at 08:10 AM.

  4. #4
    ph34r t3h g04t Whir's Avatar
    Join Date
    Oct 2001
    Location
    Kingsford, MI
    Posts
    29,235
    Blog Entries
    7
    Sounds like you need to make it event driven. When the user picks a selection in the first box, use the event, OnClick or whatever it is in JavaScript, and check to see which selection the user made. Then you can pull values in for the next box, and so on and so forth.

    But are the selections in the second box going to change entirely based on what's selected in the first box, or is it going to be the same list, but you don't want them to make the same selectiont wice?

  5. #5
    Junior Member
    Join Date
    May 2004
    Posts
    4
    selections should not change, no. The first 4 selections should be the source for the next two selections, and the two selections should be the source for the last selections...

    Say you have a list of this:
    Apple
    Orange
    Banana
    Peach
    Carrot
    Chokolate

    In the first four boxes you select from the entire list, and select: Apple, Carrot, Chokolate and Peach.

    Below that, you have two new dropdown boxes. When you click the dropdown, you get Apple, Carrot, Chokolate and Peach to select from. You select Carrot and Chokolate.

    Below taht again, you are presented with one dropdown list, and click it. You can now select from Carrot or Chokolate....

    Am I making any sense?

    Each dropdown section should be based on pervious selections...

  6. #6
    Junior Member
    Join Date
    May 2004
    Posts
    4

    getting nowhere

    I am getting nowhere. I have been trying and trying.
    Can someone helpe me out, just starting?

    I can't even manage to populate a selectionbox from an array...
    Maybe I should ask for someone to write me the script... or a small examplescript that I could look into...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. script help please
    By cracked in forum Webmastering and Programming
    Replies: 5
    Last Post: December 7th, 2003, 11:06 PM
  2. form validation issue
    By dragonb in forum Webmastering and Programming
    Replies: 4
    Last Post: September 19th, 2003, 01:21 AM
  3. Questions about Tables
    By Creatures in forum Webmastering and Programming
    Replies: 8
    Last Post: October 9th, 2002, 06:52 PM
  4. Java for XP??!??!?!?!
    By skybolt_1 in forum Applications and Operating Systems
    Replies: 4
    Last Post: July 15th, 2002, 10:45 AM
  5. JavaScript: Form Validation...
    By Agent_Embryo in forum Webmastering and Programming
    Replies: 10
    Last Post: April 16th, 2002, 03:58 PM

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Recommended Sites: ResellerRatings Store Reviews