Selecting a Drop Down Dynamically

Results 1 to 2 of 2

Thread: Selecting a Drop Down Dynamically

  1. #1
    Join Date
    Dec 1969

    Default Selecting a Drop Down Dynamically

    I am tring to set up some database editing forms and for some reason I can&#039;t get this function to work<BR>do while rs.eof = false<BR> if rs(field) = variable then<BR> selected = "selected"<BR> else<BR> selected = ""<BR> end if <BR>response.write("&#060;option value=""" & rs(field) & """ & selected & "&#062;" .... etc...<BR><BR>although the field matches the variable, it won&#039;t work. I tried making the rs(field) value under a variable in advance of the script like:<BR>v2 = rs(field)<BR>if v2 = variable then<BR>etc etc<BR>and that didn&#039;t help either.<BR><BR>What am I missing here????<BR><BR>Eric<BR>

  2. #2
    Join Date
    Dec 1969

    Default DEBUG

    For starters, just do<BR> Response.Write "DEBUG: " & variable & "&#060;HR&#062;"<BR>just before the &#060;SELECT&#062;.<BR><BR>Remember, the = comparison is case sensitive and *does* care about spaces on the end of strings, etc., etc. It has to be an *EXACT* match.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts