home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 1834
Discussions: 188,398, Posts: 2,243,595, Members: 232,629
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)
Kawaru wa yo!
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 16,137
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 online now   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)
Kawaru wa yo!
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 16,137
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 online now   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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

Most Active Discussions
Is It Just Me? (2905)
Unarmed man on his stomach shot by .. (6)
Misery Loves Company... (2144)
New Build ( Finally ) (6)
CPU wont boot (7)
Building a gaming computer advice (5)
I think I just killed my computer w.. (24)
Folderchat Weekday thread (444)
Upgrading RAM (6)
Recent Discussions
Partition Magic 7.0 (Unallocate.. (17)
For cheap price and good qualit.. (1)
Left 4 Dead Small Freezes (3)
RCA 52Inch HDTV wont turn on (4)
wishin i could edit my aol prof.. (0)
Sporadic internet connectivity (2)
Assassins Creed PC Problems (40)
I think my PSU is dieing (1)
building a gaming computer, inp.. (0)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 03:34 AM.
TechIMO Copyright 2008 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