I have a drop down menu, and when the user selects an option, I need to call a vbscript subroutine, with a certain parameter attached. I thought that the syntax for a passing a parameter to a subroutine was as follows:
CallAnotherSub x
And then the subroutine is:
Sub CallAnotherSub (var1)
I have tried to implement this in the following way:
<%
dim tempvar
tempvar = 3
%>
<select name="sortList" style="width:180px;" onChange="sortFunc tempvar">
Then my subroutine looks like:
<script type="text/vbscript">
sub sortFunc(var1)
msgbox "newURL is currently " + var1
end sub
</script>
However, the message box doesn’t display it. What is the problem?????
CallAnotherSub x
And then the subroutine is:
Sub CallAnotherSub (var1)
I have tried to implement this in the following way:
<%
dim tempvar
tempvar = 3
%>
<select name="sortList" style="width:180px;" onChange="sortFunc tempvar">
Then my subroutine looks like:
<script type="text/vbscript">
sub sortFunc(var1)
msgbox "newURL is currently " + var1
end sub
</script>
However, the message box doesn’t display it. What is the problem?????