I'm making a e-mailer form on my web page, and I got a combobox that has as choices all of the states. What I want it to do is that when a user picks a state, it sends the e-mailto the appropriate person(denoted by names west, east, etc. heres the code i have so far. I get 2 errors. 1st says im missing a ( somewhere in the first statement, 2nd says the if at the end of the else if statement(last one) doesn't match. ANy help would be greatly appreciated
this should fix the on(event) errors on(release) if(STATE.text == "CA,OR,WA,ID,NV,MT,WY,UT,AZ,AK,HI,NM") recipient = "WEST" }else if(STATE.text == "TX,CO,ND,SD,NE,KS,OK,AR,IA,MO") recipient = "SOUTH" }else if(STATE.text == "MN,LA,WI,IL,KV,AL,GA,MS,FL,SC,NC,VA,WV,IN,MI") recipient = "EAST" } else recipient = "North" getURL("")
Jack, I can't thank you enough man!!! YOu saved my butt on that one!
I see you helped someone else with recipient. Can you please help me with an array. When numbers selected, to go to a particular frame? and if not selected for message to display???? appreciate greatly. ale on(release) if(STATE.text == "1,2,3") gotoAndStop (21) }else if(STATE.text == "4,5,6") gotoAndStop (22) } else messge = "Please select a State"
If you want something to happen if STATE.text is an element of an array, try something like: for(x=0;x<arrayName.length;x++){ if(STATE.text ==arrayName[x]){ do something; }
I will try that. Thank you very much.
[quoted text, click to view] > on(release) > if(STATE.text == "1,2,3") > gotoAndStop (21) > }else if(STATE.text == "4,5,6") > gotoAndStop (22) > } else > messge = "Please select a State"
Are you actually expecting the user to type in "1,2,3" ?? Because that is what you are testing for. Or are you waning to check for one of three possibilities.. in which case use if (STATE.text = "1" || STATE.text = "2" || STATE.text = "3") etc
Don't see what you're looking for? Try a search.
|