Updatate Combobox options based on other combobox (ASP/SQL)

Results 1 to 3 of 3

Thread: Updatate Combobox options based on other combobox (ASP/SQL)

  1. #1
    Join Date
    Dec 1969
    Posts
    13

    Default Updatate Combobox options based on other combobox (ASP/SQL)

    I&#039ve got a form including some textareas and two ComboBoxes with options taken from SQL-string. When I select option in the first one I want the other one to get new options (requerry SQL), I&#039d be glad if I don&#039t have to post the form because I want to keep the text in the textboxes. How can I do this? I would prefer to use VB-script, because I&#039ve used that everywhere else. <BR>

  2. #2
    Daniel Root Guest

    Default RE: Updatate Combobox options based on other combobox (ASP/SQL)

    You can&#039t requerry the SQL without re-loading. To keep the text in the textboxes, though, you can:<BR>&#060;%<BR>rsName = request.form("NameBOX")<BR>%&#062;<BR>&#060;form name="myForm" method="Post" action="&#060;%=request.servervariables("SCRIPT_NA ME")%&#062;<BR>&#060;input type="text" name="NameBOX" value="&#060;%=rsName%&#062;"&#062;<BR>&#060;input type="hidden" name="cmd"&#062;<BR>&#060;/form&#062;<BR><BR>What I do then is use client-side script to change cmd based on a button or link pushed. If cmd is blank, the ASP fills in the form based on previous info.

  3. #3
    Join Date
    Dec 1969
    Posts
    13

    Default RE: Updatate Combobox options based on other combobox (ASP/SQL)

    Thanks a lot, but the script is realy big and I don&#039t wanna make anoter page in that script.

Posting Permissions

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