Thread: form in asp
View Single Post
  #2 (permalink)  
Old April 13th, 2006, 02:50 PM
seran128 seran128 is offline
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Changed the asp block to something like this

Response.Write "<script src=""selectcontact.js""></script>"
 Response.Write "<form>"
 Response.Write "<select name=""contactID"" onchange=""showCustomer(this.value)"">"

 Response.Write "<OPTION Value=""""></OPTION>"

 ' Loop through the recordset and populate the dropdown
 Do Until objRS.EOF = True
  contactID = objRS("contactID").Value
  wlcfsName = objRS("Name").Value


  If contactID = SelectedContactID Then
   Response.Write "<OPTION Value=""" & contactID & """ SELECTED>"
   Response.Write Name
   Response.Write "</OPTION>"
  Else
   Response.Write "<OPTION Value=""" & contactID & """>"
   Response.Write Name
   Response.Write "</OPTION>"
  End If