Click to See Complete Forum and Search --> : debugging a script


cruser01
10-31-2003, 09:03 AM
Hi,
I asked a question before but I made some changes, and need some more help. I want to make a combo box drop down and allow the person to select an item and then that item needs to pass a code. Here is what I have so far, but I can't find the syntax errors. Can someone help? Thanks for your previous help, and I could use some more.

if (document.forms[0].C_Race_Drop10.value == "White"){
document.forms[0].C_Race10.value = "1WH";
document.forms[0]. C_Sex10.focus(); }
else if (document.forms[0].C_Race_Drop10.value == "Black/African American"){
document.forms[0].C_Race10.value = "2BL"; }
document.forms[0]. C_Sex10.focus();

else if (document.forms[0].C_Race_Drop10.value == "American Indian/Alaska Native"){
document.forms[0].C_Race10.value = "4AM";}
document.forms[0]. C_Sex10.focus(); }

else if (document.forms[0].C_Race_Drop10.value == "Asian"){
document.forms[0].C_Race10.value = "5AS"; }
document.forms[0]. C_Sex10.focus();


else if (document.forms[0].C_Race_Drop10.value == "Native Hawiian/Pacific Islander"){
document.forms[0].C_Race10.value = "6NA"; }
document.forms[0]. C_Sex10.focus();

else if (document.forms[0].C_Race_Drop10.value == "Other"){
document.forms[0].C_Race10.value = "UOT"; }
document.forms[0]. C_Sex10.focus();

Shampie
10-31-2003, 12:12 PM
can you post the whole page?
easier to track (for me)..

cruser01
10-31-2003, 02:51 PM
Originally posted by Shampie
can you post the whole page?
easier to track (for me)..

Hi,
Thanks for your help. We decided that it won't work in a pdf file, so we are just going to leave the field as is.