Quote:
quote:Originally posted by dpkbahuguna
Hi woodyz yes your code is working fine but will u give me the code to call this event on <select> (combobox) event like onChange.
I did it but i am unable to call it.
Thanks waiting for reply....
|
I bet you would find it useful to do a search on the web for this sort of thing. There are numerous tutorial and code snippets on how to use these events. Of course, you are probably going to be much better off doing this with Javascript rather than VBScript.
However - I might not be understanding your question. Is it that you want the form to submit whenever the user changes the selection in the dropdown? That can be done the same way (either with javascript or vbscript) by handling the onchange event. Or perhaps you are asking how to "reponse.write" something to the browser without posting back - in which case you'll need client side scripts (again, either Javascript or vbscript) that manipulate the document object.
It might be useful to you to better describe what you are trying to do.
Here is the code for running vbscript with the onchange event:
Code:
<script language='vbscript'>
sub DropdownTest
msgbox "This is the dropdown test"
end sub
sub cboTestTwo_onchange
msgbox "This is the second dropdown test"
end sub
</script>
<select name='cboTest'onchange='DropdownTest'>
<option value='1'>One</option>
<option value='2'>Two</option>
<option value='3'>Three</option>
<option value='4'>Four</option>
</select>
<br/>
<select name='cboTestTwo'>
<option value='5'>Five</option>
<option value='6'>Six</option>
<option value='7'>Seven</option>
<option value='8'>Eight</option>
</select>
Woody Z
http://www.learntoprogramnow.com