Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder StealthRT's Avatar
    Join Date
    Aug 2006
    Posts
    185
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Exclamation ASP VBscript public sub help

    Hey all i need a way for the user, when they choose a store from a cbobox to populate another cbobox depending on what the user choose in the first cbobox.

    I cant seem to execute a public sub once i put the onchange="" on the first cbobox.

    Code:
    <select name="cboSelect" class="FieldStyleDropDown" id="cboSelect" onchange="FillBox">
            <option value=" "> </option>
            <option value="GP">Gunbarrel Point</option>
          </select>
    Code:
    <%
    Public Sub FillBox()
    blah blah blah...
    %>
    Am i leaving something out???

    Thanks!
    David

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    onchange is a client-side event handler; fired by the browser. Anything in <% %> tags is server-side code, that runs at the server. If you're not sure about the distinction between those, I'd recommend that you go through some basic ASP tutorials. Once you've done that, you could try searching this forum for terms like "change", "second" and "dropdown" - you'll find several threads that go into the problem you're having in great detail.

  • #3
    Senior Coder
    Join Date
    Nov 2002
    Location
    North-East, UK
    Posts
    1,265
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There are several threads here with different methods for dropdowns
    http://forums.aspfree.com/code-bank-54/

    http://forums.aspfree.com/search.php?searchid=443425


  •  

    Posting Permissions

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