home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

web form selection javascript help

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1746
Discussions: 200,990, Posts: 2,379,884, Members: 246,359
Old May 21st, 2004, 07:49 AM   Digg it!   #1 (permalink)
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?
elfranger is offline   Reply With Quote
Old May 21st, 2004, 09:02 AM     #2 (permalink)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,573
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?
Whir is offline   Reply With Quote
Old May 21st, 2004, 09:08 AM     #3 (permalink)
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 09:10 AM.
elfranger is offline   Reply With Quote
Old May 21st, 2004, 09:22 AM     #4 (permalink)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,573
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?
Whir is offline   Reply With Quote
Old May 21st, 2004, 09:31 AM     #5 (permalink)
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...
elfranger is offline   Reply With Quote
Old May 21st, 2004, 10:50 AM     #6 (permalink)
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...
elfranger is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
script help please cracked Webmastering and Programming 5 December 7th, 2003 11:06 PM
form validation issue dragonb Webmastering and Programming 4 September 19th, 2003 02:21 AM
Questions about Tables Creatures Webmastering and Programming 8 October 9th, 2002 07:52 PM
Java for XP??!??!?!?! skybolt_1 Applications and Operating Systems 4 July 15th, 2002 11:45 AM
JavaScript: Form Validation... Agent_Embryo Webmastering and Programming 10 April 16th, 2002 04:58 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3074)
Charges against non-tippers dropped.. (20)
Health Care Rationing (12)
Delete an OS (17)
Nvidia GTX 260 problem (10)
Laptop with wireless problem. (12)
windows vista security holes (19)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (8)
windows 7 problem (7)
[F@H SPAM 11/16/09] ! 1/2 months to.. (39)
Internet Lost (5)
Recent Discussions
Foxconn Blackops x48 MoBo (2)
Q9650 vs. Q9550 (0)
Desktop Calendar Application (2)
Looking for new motherboard (1)
soundmon.exe (8)
Jedi Academy Problem (3)
Can a page file be "too big".. (1)
Nvidia GTX 260 problem (10)
Point and Shoot Camera Suggestions. (8)
Size after cutting 700Mb file is 2.5 .. (0)
Delete an OS (17)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (39)
windows vista security holes (19)
updating BIOS via winflash, claims fi.. (1)
New Server Configuration Suggestions (0)
cheap gaming laptop? (12)
Unallocated Space (2)
help me pls laptop just stopped worki.. (1)
C# + LINQ Help (7)
Dynex DX E-402 (3)
EVGA 9800 gtx help with finding a goo.. (12)
Multiple Restarts Required at Boot (5)
cell phone won't work (0)
Is the PSU I received dead? (15)
Can't open Word (12)


All times are GMT -4. The time now is 08:36 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28