Your Ad Here

Posted By

fuzzylogic on 03/08/07


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

nelda751
asifrizvigmailcom


SelectState


 / Published in: ASP
 

  1. function SelectState(state)
  2.  
  3. dim statesList, states
  4. statesList = ("AL,AK,AZ,AR,CA,CO,CT,DE,FL,GA,HI,ID,IL,IN,IA,KS,KY,LA,ME,MD,MA,MI,MN,MS,MO,MT,NE,NV,NH,NJ,NM,NY,NC,ND,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VT,VA,WA,WV,WI,WY")
  5. states = Split(statesList,",")
  6. response.write("<option></option>")
  7. For i=0 to UBound(states)
  8. response.write "<option"
  9.  
  10. if states(i) = state then
  11. response.write (" selected")
  12. end if
  13. response.write (">" & states(i) & "</option>" & vbCrlf)
  14. Next
  15. end function

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: fuzzylogic on June 12, 2008

You need to login to post a comment.