请多多指教!100分送上!!
唉!这阵问题多多,敬请一一指教。
1、我在程序中想用一个按纽提交两个FORM,第一个FORM名为SUBTXT,第二个FORM名为SUBPICform,我在SUBTXT_ONSubmit事件中写了第二个FORM的提交事件,不知为何第二个FORM提交不上去?
2、我在服务器端的变量(通过REQUEST获得),现在想在客户端用这个变量来控制提交事件,不知如何来做?
3、我的图形提交页面能将图形提交到ACCESS数据库,但却显示不出来,程序见SHOWIMG.ASP,哦,能显示个0出来。
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Sub subtxt_onsubmit
stype=session("subtype")
if ((stype=3) or (stype=4)) then
if (document.subtxt.subpicture.checked=true) then
document.subpicform.submit
end if
end if
if (stype=4) then
if (document.subtxt.anspicture.checked=true) then
document.anspicform.submit
end if
end if
End Sub
-->
</SCRIPT>
<body background="image/fawall.gif">
<%
subtype=request("r1")
subtype=int(subtype)
session("subtype")=subtype
%>
<form method="POST" name="subtxt" action="papertxtin.asp" language=vbscript>
.......
<%
if (subtype=3) or (subtype=4) then
%>
<td width="50%" height="12" colspan="4">
<p align="center">
<input type="checkbox" name="SubHavePic" value="ON" id="subpicture" onclick="showsubpic()"><span id="subhave">试题有图片
</td>
<%
end if
if (subtype=4) then
%>
<td width="50%" height="12" colspan="4">
<p align="center">
<input type="checkbox" name="AnsHavePic" value="ON" id="anspicture" onclick="showanspic()"><span id="anshave">答案有图片
</td>
<%end if%>
<input name="B1" type="submit" value="提交"></td>
<input name="B2" type="reset" value="重写"></td>
</form>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="47">
<tr>
<td width="50%" height="47">
<form method="POST" name="subpicform" enctype="multipart/form-data" action="subpicin.asp" style="display:none">
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="0">
<p align="center"><input type="file" name="F1" size="9"></p>
</form>
</td>
<td width="50%" height="47">
<form method="POST" name="anspicform" enctype="multipart/form-data" action="anspicin.asp" style="display:none">
<input TYPE="hidden" NAME="VTI-GROUP" VALUE="1">
<p align="center"><input type="file" name="F1" size="9"></p>
</form>
</td>
</tr>
</body>
showimg.asp
<%@ Language=VBScript%>
<%
chapterid=request("cid")
subid=request("sid")
set conn=server.createobject("adodb.connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("paper.mdb")
set rs=server.createobject("adodb.recordset")
strsql="select * from submattergraph where chapterid=" & chapterid & " and subid=" & subid
rs.open strsql,conn,1,3
response.ContentType="image/gif"
response.BinaryWrite rs.fields("subgraph")
rs.close
set rs=nothing
set conn=nothing
%>
程序不多,麻烦看看!!