Javascript variable to VBScript

D

Dave Anderson

How do I submit a javascript variable to .asp/VBScript?

I have the following form. Which calls the updateClasses function. At the
same time, I need to add either a querystring or hidden field that becomes
<%= view %> The value of view = this.selectedIndex.value

I then need to request the variable when the function runs (without
reloading the page) The variable view, then determines the content in my
IFrame window.

I think this will work, but I am not sure of the syntax when combine
vbscript and javascript

<form name=form1 method=post">
<tdSORT BYbr>
<select multiple class="RubricContent"
style="background-color:FFFFFF; border:1 solid
black; width:110;"
onChange="updateClasses( this.form, 0,
this.selectedIndex );">
<option value="SciLinks"<% if view = "SciLinks"
then response.write "selected" end if %>>SCILINKS</option>
<option value="Classes"<% if view = "Classes" then response.write
"selected" end if %>>CLASSES</option>
</select>
</td>
</form>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,156
Latest member
KetoBurnSupplement
Top