设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 91|回复: 2
打印 上一主题 下一主题

当点击提交的时候,javascript函数不运行

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-19 04:54:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
<html>
<HEAD>
<title>New Page 1</title>
<%'会议预定页面%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</HEAD>
<body>
<%
hidSql = Request.Form("Hid_Sql")
if hidSql = "1" then
dsn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath("meeting.mdb")
set conn = Server.CreateObject("ADODB.Connection")
conn.Open dsn

sqlSelect = "select * from meeting"
set rsMeeting = server.createobject("ADODB.Recordset")
rsMeeting.Open sqlSelect, conn, 1, 3

rsMeeting.AddNew

rsMeeting("companyName") = Request.Form("companyName")
rsMeeting("address") = Request.Form("address")
rsMeeting("postalcode") = Request.Form("postalcode")
rsMeeting("fax") = Request.Form("fax")
rsMeeting("realName1") = Request.Form("realName1")
rsMeeting("sex1") = Request.Form("sex1")
rsMeeting("duty1") = Request.Form("duty1")
rsMeeting("tel1") = Request.Form("tel1")
rsMeeting("moveTel1") = Request.Form("moveTel1")
rsMeeting("arriveTime1") = Request.Form("arriveTime1")
rsMeeting("realName2") = Request.Form("realName2")
rsMeeting("sex2") = Request.Form("sex2")
rsMeeting("duty2") = Request.Form("duty2")
rsMeeting("tel2") = Request.Form("tel2")
rsMeeting("moveTel2") = Request.Form("moveTel2")
rsMeeting("arriveTime2") = Request.Form("arriveTime2")
rsMeeting("realName3") = Request.Form("realName3")
rsMeeting("sex3") = Request.Form("sex3")
rsMeeting("duty3") = Request.Form("duty3")
rsMeeting("tel3") = Request.Form("tel3")
rsMeeting("moveTel3") = Request.Form("moveTel3")
rsMeeting("arriveTime3") = Request.Form("arriveTime3")
rsMeeting("payment") = Request.Form("payment")

rsMeeting.Update

rsMeeting.Close
conn.Close
%>
<script language="Javascript">
window.open("ad.htm","","height=220,width=280,top=0,left=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=NO,location=no");
</script>
<%
else
%>
<p></p>
<script language="javascript">
function FunIsNull()
{
window.alert("asdf");
if(document.form1.companyName.value == "" || document.form1.address.value == "" || document.form1.postalcode.value =="" || document.form1.fax.value =="")
{
alert("请输入公司的基本信息");
return false;
}
if((document.form1.realName1.value <> "" || document.form1.duty1.value <> "" || document.form1.tel1.value <> "") &&
(document.form1.realName1.value == "" || document.form1.duty1.value == "" || document.form1.tel1.value == ""))
{
alert("请将个人信息填写完全");
return false;
}
if((document.form1.realName2.value <> "" || document.form1.duty2.value <> "" || document.form1.tel2.value <> "") &&
(document.form1.realName2.value == "" || document.form1.duty2.value == "" || document.form1.tel2.value == ""))
{
alert("请将个人信息填写完全");
return false;
}
if((document.form1.realName3.value <> "" || document.form1.duty3.value <> "" || document.form1.tel3.value <> "") &&
(document.form1.realName3.value == "" || document.form1.duty3.value == "" || document.form1.tel3.value == ""))
{
alert("请将个人信息填写完全");
return false;
}
if(document.form1.realName1.value == "" && document.form1.realName2.value == "" && document.form1.realName3.value == "")
{
alert("请输入个人信息");
return false;
}
}
</script>
<form name="form1" method="post" action="Preconcert.asp" onsubmit="return FunIsNull();">
<P align="left"><font face="幼圆"><b>
<TABLE id="Table1" height="96" cellSpacing="0" cellPadding="0" width="536" border="1">
<TR>
<TD bgColor="silver" colSpan="2">
<P align="left"><FONT face="宋体"></FONT><STRONG>公司基本信息</STRONG></P>
</TD>
</TR>
<TR>
<TD><STRONG>单位名称:</STRONG></TD>
<TD><input type="text" name="companyName" size="54"><FONT color="#cc0033">*</FONT></TD>
</TR>
<TR>
<TD><STRONG>通讯地址:</STRONG></TD>
<TD><INPUT type="text" size="54" name="address"><STRONG></STRONG><FONT color="#cc0033">*</FONT></TD>
</TR>
<TR>
<TD><STRONG>邮政编码:</STRONG></TD>
<TD><INPUT type="text" size="18" name="postalcode"><STRONG></STRONG><FONT color="#cc0033">*</FONT>&nbsp;</TD>
</TR>
<TR>
<TD><STRONG>公司传真:</STRONG></TD>
<TD><INPUT type="text" size="18" name="fax"><STRONG></STRONG><FONT color="#cc0033">*</FONT></TD>
</TR>
</TABLE>
</b></font><font face="幼圆"><FONT color="#cc0033"></FONT></font>
</P>
<p align="center">
</p>
<FONT face="幼圆" color="#cc0033"></FONT>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<TR>
<TD align="center" width="16%" bgColor="#c6c3c6" colSpan="6">
<P align="left"><STRONG><FONT face="幼圆">人员基本信息</FONT></STRONG></P>
</TD>
</TR>
<tr>
<td width="16%" align="center" bgcolor="#c6c3c6"><b><font face="幼圆">姓名</font></b><FONT color="#cc0033">*</FONT></td>
<td width="16%" align="center" bgcolor="#c6c3c6"><b><font face="幼圆">性别</font></b><FONT color="#cc0033">*</FONT></td>
<td width="17%" align="center" bgcolor="#c6c3c6"><b><font face="幼圆">职务</font></b><FONT color="#cc0033">*</FONT></td>
<td width="17%" align="center" bgcolor="#c6c3c6"><b><font face="幼圆">电话</font></b><FONT color="#cc0033">*</FONT></td>
<td width="17%" align="center" bgcolor="#c6c3c6"><b><font face="幼圆">手机</font></b></td>
<td width="17%" align="center" bgcolor="#c6c3c6"><b><font face="幼圆">到达时间</font></b></td>
</tr>
<tr>
<td width="16%" align="center"><font face="幼圆"><input type="text" name="realName1" size="17"></font></td>
<td width="16%" align="center"><font face="幼圆"><input type="radio" value="男" name="sex1" checked>男&nbsp;
<input type="radio" name="sex1" value="女">女</font></td>
<td width="17%" align="center"><font face="幼圆"><input type="text" name="duty1" size="17"></font></td>
<td width="158" align="center"><font face="幼圆"><input type="text" name="tel1" size="17"></font></td>
<td width="17%" align="center"><font face="幼圆"><input type="text" name="moveTel1" size="17"></font></td>
<td width="17%" align="center"><font face="幼圆"><input type="text" name="arriveTime1" size="17"></font></td>
</tr>
<tr>
<td width="16%" align="center"><font face="幼圆"><input type="text" name="realName2" size="17"></font></td>
<td width="16%" align="center"><font face="幼圆"><input type="radio" value="男" name="sex2" checked>男&nbsp;
<input type="radio" name="sex2" value="女">女</font></td>
<td width="17%" align="center"><font face="幼圆"><input type="text" name="duty2" size="17"></font></td>
<td width="17%" align="center"><font face="幼圆"><input type="text" name="tel2" size="17"></font></td>
<td width="17%" align="center"><font face="幼圆"><input type="text" name="moveTel2" size="17"></font></td>
<td width="17%" align="center"><font face="幼圆"><input type="text" name="arriveTime2" size="17"></font></td>
</tr>
<tr>
<td width="16%" align="center"><font face="幼圆"><input type="text" name="realName3" size="17"></font></td>
<td width="16%" align="center"><font face="幼圆"><input type="radio" value="男" checked name="sex3">男&nbsp;
<input type="radio" name="sex3" value="女">女</font></td>
<td width="17%" align="center"><font face="幼圆"><input type="text" name="duty3" size="17"></font></td>
<td width="17%" align="center"><font face="幼圆"><input type="text" name="tel3" size="17"></font></td>
<td width="17%" align="center"><font face="幼圆"><input type="text" name="moveTel3" size="17"></font></td>
<td width="17%" align="center"><font face="幼圆"><input type="text" name="arriveTime3" size="17"></font></td>
</tr>
</table>
<p align="center">
<INPUT type="hidden" name="Hid_Sql" runat="server" value="1" id="Hidden1">
</p>
<p align="center"><font face="幼圆"><FONT color="#cc0033">*</FONT><b>会晤费的支付方式: <input type="radio" name="payment" value="银行电汇"></b>银行电汇<b>&nbsp;&nbsp;
<input type="radio" name="payment" value="邮局汇款"></b>邮局汇款<b>&nbsp;&nbsp; <input type="radio" name="payment" value="现金" checked></b>现金</font></p>
<p align="center">
</p>
<p align="center">
<input type="submit" value="提交" size="20">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" value="重写" name="B2"></p>
</form>
<%
end if
%>
</body>
</html>

当点击提交的时候,funIsNull函数不运行,各位帮我看看,谢谢了先。
2#
发表于 2010-2-28 22:05:06 | 只看该作者
同志们,乡亲们,所有可爱漂亮的MM们,”我骄傲,因为我回帖
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-18 08:50 , Processed in 0.180518 second(s), 9 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表