B
bob
Hi,
I made a ASP file in order to pass variables from VB or JAVAscript to the
ASP-server. Both ASP script are in VB, but the client-script are in VB and
in JAVAscript. The name are testvb.asp and testjava.asp.
My problem is: it works with testvb.asp but not with testjava.asp (no error
but nothing appears)
1) testvb.asp:
<form name="fo" method="post">
<SELECT name="pck" STYLE="position:absolute;left=140;width:45">
<option value=1> 1
<option value=2> 2
</SELECT>
<input name="hid" type="hidden" value="" >
<INPUT id=go TYPE="button" value="test"
STYLE="Position:absolute;left:280;top:200">
</form>
<script language=vbscript>
sub go_onclick()
on error resume next
fo.hid.value="bobo"
fo.action="testvb.asp"
fo.submit
end sub
</script>
<%
a=request("pck")
b=request("hid")
response.write(a & " " & b)
%>
1) testjava.asp
<form name="fo" method="post">
<SELECT name="pck" STYLE="position:absolute;left=140;width:45">
<option value=1> 1
<option value=2> 2
</SELECT>
<input name="hid" type="hidden" value="" >
<INPUT id="go" TYPE="button" value="test"
STYLE="Position:absolute;left:280;top:200">
</form>
<script language=javascript>
function goonclick()
{
document.getElementById("hid").value="bibi"
document.getElementById("fo").action="testjava.asp"
document.getElementById("fo").submit
}
document.getElementById("go").onclick=goonclick
</script>
<%
a=request("pck")
b=request("hid")
response.write(a & " " & b)
%>
By the way, suppose i want also the asp-script in javascrip: is the code
between <% %> also valid for javascript?
Thanks for any help
bob
I made a ASP file in order to pass variables from VB or JAVAscript to the
ASP-server. Both ASP script are in VB, but the client-script are in VB and
in JAVAscript. The name are testvb.asp and testjava.asp.
My problem is: it works with testvb.asp but not with testjava.asp (no error
but nothing appears)
1) testvb.asp:
<form name="fo" method="post">
<SELECT name="pck" STYLE="position:absolute;left=140;width:45">
<option value=1> 1
<option value=2> 2
</SELECT>
<input name="hid" type="hidden" value="" >
<INPUT id=go TYPE="button" value="test"
STYLE="Position:absolute;left:280;top:200">
</form>
<script language=vbscript>
sub go_onclick()
on error resume next
fo.hid.value="bobo"
fo.action="testvb.asp"
fo.submit
end sub
</script>
<%
a=request("pck")
b=request("hid")
response.write(a & " " & b)
%>
1) testjava.asp
<form name="fo" method="post">
<SELECT name="pck" STYLE="position:absolute;left=140;width:45">
<option value=1> 1
<option value=2> 2
</SELECT>
<input name="hid" type="hidden" value="" >
<INPUT id="go" TYPE="button" value="test"
STYLE="Position:absolute;left:280;top:200">
</form>
<script language=javascript>
function goonclick()
{
document.getElementById("hid").value="bibi"
document.getElementById("fo").action="testjava.asp"
document.getElementById("fo").submit
}
document.getElementById("go").onclick=goonclick
</script>
<%
a=request("pck")
b=request("hid")
response.write(a & " " & b)
%>
By the way, suppose i want also the asp-script in javascrip: is the code
between <% %> also valid for javascript?
Thanks for any help
bob