HELLO ALL!!! Dynamic menus / lists in updates help

Results 1 to 2 of 2

Thread: HELLO ALL!!! Dynamic menus / lists in updates help

  1. #1
    Join Date
    Dec 1969

    Default HELLO ALL!!! Dynamic menus / lists in updates help

    Hi All,<BR><BR>I have a dynamic drop down list of about 8 options in an updates page. On my results page, I was wondering if it was possible to have the value in the drop down passed from the results page as the selected option by default on the results page.<BR><BR>i.e if the field job_cat in the database has 8 options, one of which is option4. How can I make sure option4 is always the value selected by default in the drop down list if it appears in a particular query.<BR><BR>The code I have so far is:<BR><BR>&#060;option value="&#060;%=(rsUpdate.Fields.Item("JOB_CatName" ).Value)%&#062;" &#060;%if (CStr(rsUpdate.Fields.Item("JOB_CatName").Value) = CStr(rsUpdate.Fields.Item("JOB_CatName").Value)) then Response.Write("SELECTED") : Response.Write("")%&#062; &#062;&#060;%=(rsUpdate.Fields.Item("JOB_CatName") .Value)%&#062;&#060;/option&#062;<BR><BR>thx<BR>SIP :)<BR>

  2. #2
    Join Date
    Dec 1969

    Default Why are you comparing..

    .. the database field against itself?<BR><BR>rsUpdate.Fields.Item("JOB_CatName") .Value) = rsUpdate.Fields.Item("JOB_CatName").Value<BR><BR>? ? View your HTML source, I bet they ALL say "SELECTED".<BR><BR>You need to compare the database field against a form value or variable.

Posting Permissions

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