-
May 21st, 2004, 06:49 AM #1Junior 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?
-
May 21st, 2004, 08:02 AM #2
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?
-
May 21st, 2004, 08:08 AM #3Junior 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 selectionsLast edited by elfranger; May 21st, 2004 at 08:10 AM.
-
May 21st, 2004, 08:22 AM #4
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?
-
May 21st, 2004, 08:31 AM #5Junior 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...
-
May 21st, 2004, 09:50 AM #6Junior 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
-
script help please
By cracked in forum Webmastering and ProgrammingReplies: 5Last Post: December 7th, 2003, 11:06 PM -
form validation issue
By dragonb in forum Webmastering and ProgrammingReplies: 4Last Post: September 19th, 2003, 01:21 AM -
Questions about Tables
By Creatures in forum Webmastering and ProgrammingReplies: 8Last Post: October 9th, 2002, 06:52 PM -
Java for XP??!??!?!?!
By skybolt_1 in forum Applications and Operating SystemsReplies: 4Last Post: July 15th, 2002, 10:45 AM -
JavaScript: Form Validation...
By Agent_Embryo in forum Webmastering and ProgrammingReplies: 10Last Post: April 16th, 2002, 03:58 PM



LinkBack URL
About LinkBacks



Reply With Quote

Remember kids, what you share to the public on your facebook can be found by anyone... someone left theirs public and I saw something that I really wish I hadn't. PRIVATE4LIFE
Is It Just Me? v233893843