Results 1 to 2 of 2

Thread: Drop Down List

  1. #1

    Thread Starter
    Hyperactive Member parkes's Avatar
    Join Date
    Jan 1999
    Location
    Unitied Kingdom
    Posts
    303

    Unhappy

    I've got a drop down list with some values in it. What I want to be able to do is when I select an option from the list put a value in another field on the screen.

    How is this done. I think its done with the onChange command, but I cannot get it to work!

    Please help
    Thanks in advance for any help provided.

    VB 6 Enterprise Edition SP4
    ADO, SQL 7/2000, ASP and some JavaScript


    >> Life goes on, but for how long? <<
    If you can smile when things go wrong, you have someone in mind to blame

  2. #2
    Member
    Join Date
    Aug 2000
    Location
    Florida
    Posts
    45

    onChange with dropdown list

    This is a javascript version. For VB, replace the "this" with the dropdown list box name...

    <select name="cboCust" size="1" ONCHANGE="this.form.hidCustName.value = this.options[this.selectedIndex].text" tabindex="1">

    <%' Fill the combo box however you like %>
    <OPTION value="whatever"> <font size="2">whatever</font> </OPTION>
    <OPTION value="who"> <font size="2">who</font> </OPTION>
    </select>

    <%' this field should display selection from dropdown%>
    <input type="text" name="hidCustName" value="">

    Let me know if you run into problems.
    If I could only remember my name...

Posting Permissions

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



Click Here to Expand Forum to Full Width