I have two events in a form that I am passing. One is to a javascript
function, the other is to the same .asp page only with another action
to show different data.
Onchange is calls the function updateclasses, which in turn reloads
another drop-down list. It also reloads the .asp page, which
refreshes the data. My problem is that it refreshes the second
drop-down briefly, until the page reloads, but then resets the form.
How do i pass this data to the .asp?
I thought in the .asp, I could just do something simple like the
following, but wasn't sure of the correct syntax. is there a better
way?
view = request.queryst ring("view")
if view = "" then
view = "SciLink"
else
%>
<script language="JavaS cript">
updateclasses(f orm1, 0, Student)
</script>
<%
end if
<form name=form1 method=post>
<td><span class=middleCol ContentBold>SOR T BY:</span><br>
<select multiple class="rubricCo ntent"
onchange="gotos ite(this.option s
[this.selectedIn dex].value);updatec lasses(this.for m, 0,
this.selectedIn dex)" style="backgrou nd-color:FFFFFF; border:1 solid
black; width:110;">
<option value="gradeboo k3.asp?view=Sci Link" <% if view = "SciLink"
then response.write "selected" end if %>>SCILINKS</option>
<option value="gradeboo k3.asp?view=Stu dent" <% if view = "Student"
then response.write "selected" end if %>>CLASSES</option>
</select>
</td>
</form>
function, the other is to the same .asp page only with another action
to show different data.
Onchange is calls the function updateclasses, which in turn reloads
another drop-down list. It also reloads the .asp page, which
refreshes the data. My problem is that it refreshes the second
drop-down briefly, until the page reloads, but then resets the form.
How do i pass this data to the .asp?
I thought in the .asp, I could just do something simple like the
following, but wasn't sure of the correct syntax. is there a better
way?
view = request.queryst ring("view")
if view = "" then
view = "SciLink"
else
%>
<script language="JavaS cript">
updateclasses(f orm1, 0, Student)
</script>
<%
end if
<form name=form1 method=post>
<td><span class=middleCol ContentBold>SOR T BY:</span><br>
<select multiple class="rubricCo ntent"
onchange="gotos ite(this.option s
[this.selectedIn dex].value);updatec lasses(this.for m, 0,
this.selectedIn dex)" style="backgrou nd-color:FFFFFF; border:1 solid
black; width:110;">
<option value="gradeboo k3.asp?view=Sci Link" <% if view = "SciLink"
then response.write "selected" end if %>>SCILINKS</option>
<option value="gradeboo k3.asp?view=Stu dent" <% if view = "Student"
then response.write "selected" end if %>>CLASSES</option>
</select>
</td>
</form>
Comment