...

View Full Version : ASP VBscript public sub help



StealthRT
01-28-2007, 08:44 PM
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.



<select name="cboSelect" class="FieldStyleDropDown" id="cboSelect" onchange="FillBox">
<option value=" "> </option>
<option value="GP">Gunbarrel Point</option>
</select>



<%
Public Sub FillBox()
blah blah blah...
%>

Am i leaving something out???

Thanks! :)
David

Spudhead
01-29-2007, 12:43 PM
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 (http://www.w3schools.com/asp/default.asp). Once you've done that, you could try searching this forum for terms like "change", "second" and "dropdown" - you'll find several (http://www.codingforums.com/showthread.php?t=104189)threads (http://www.codingforums.com/showthread.php?t=104287)that go into the problem you're having in great detail.

degsy
01-30-2007, 01:56 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum