Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

JavaScript and Forms

data validations



10:47 pm on Mar 7, 2002 (gmt 0)

I'm trying to change a selction list according to selection on previous selection list. Does that make sense?
Here's what I have so far...
I have a feeling I'm making this a little too complicated.

function formatStrat(){
if (document.firstForm.Cornerstone.value==
<OPTION VALUE="1A">1A: Improve
<OPTION VALUE="1B">1B: Maintain
<OPTION VALUE="1C">1C: Maintan
<OPTION VALUE="1D">1D: Maintain Containment <OPTION VALUE="1E">1E: Maintain organization
<OPTION VALUE="1F">1F: Maintain and enhance }
else if(document.firstForm.Cornerstone.value==



<SELECT NAME="Cornerstone"
<OPTION VALUE="Safety">Safety
<OPTION VALUE="Personnel">Personnel
<OPTION VALUE="Performance">Performance <OPTION VALUE="Cost">Cost
OPTION VALUE="Culture">Culture

I hope this is enough info.
Thanks in advance!


11:55 pm on Mar 7, 2002 (gmt 0)

10+ Year Member

Sometimes if I am using to many If Else statements then I switch to SELECT CASE.

The code looks cleaner and is easier to understand.


Featured Threads

Hot Threads This Week

Hot Threads This Month