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=vbscri pt>
sub go_onclick()
on error resume next
fo.hid.value="b obo"
fo.action="test vb.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=javasc ript>
function goonclick()
{
document.getEle mentById("hid") .value="bibi"
document.getEle mentById("fo"). action="testjav a.asp"
document.getEle mentById("fo"). submit
}
document.getEle mentById("go"). onclick=gooncli ck
</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