我在调用两个编辑器.添加中英文产品内容,但一添就是两条.搞了很久,无法解决.望高手指点
我在调用两个编辑器.添加中英文产品内容,但一添就是两条.搞了N久,无法解决.望高手指点
中文内容:id=content
<textarea name="content" cols="62" rows="20" style="display:none"></textarea>
<iframe id="ewebeditor" src="Editor/ewebeditor.asp?id=content&style=s_red" frameborder="0" scrolling="No" width="585" height="350"></iframe>
英文内容:id=enprocontent
<textarea name="enprocontent" cols="62" rows="20" style="display:none"></textarea>
<iframe id="ewebeditor" src="Editor/ewebeditor.asp?id=enprocontent&style=s_red" frameborder="0" scrolling="No" width="585" height="350"></iframe>
这是表单程序
<!--#include file="include/data.asp"-->
<!--#include file="include/check.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr align="center" bgcolor="#3F7DBC">
<td width="100%" height="28" colspan="2" class="title">PDF Catalogue信息添加</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#E8E8E8">
<form action="pdfadd.asp?Action=Add&anclassid=<%=anclassid%>" method="post" name="myform">
<tr>
<td height="28" align="center" bgcolor="#F6F6F6">中文名称:</td>
<td width="88%" colspan="3" bgcolor="#FFFFFF"><input name="proname" type="text" class="input" id="proname" size="40" maxlength="50" />
<span class="red">* </span></td>
</tr>
<tr>
<td height="28" align="center" bgcolor="#F6F6F6">英文名称:</td>
<td colspan="3" bgcolor="#FFFFFF"><input name="enproname" type="text" class="input" id="enproname" size="40" maxlength="50" />
<span class="red">*</span></td>
</tr>
<tr>
<td height="200" align="center" bgcolor="#F6F6F6">中文内容:</td>
<td colspan="3" valign="top" bgcolor="#FFFFFF"><textarea name="content" cols="62" rows="20" style="display:none"></textarea>
</textarea>
<iframe id="ewebeditor" src="../Editor/ewebeditor.asp?id=content&style=s_red" frameborder="0" scrolling="No" width="585" height="350"></iframe></td>
</tr>
<tr>
<td height="200" align="center" bgcolor="#F6F6F6">英文内容:</td>
<td colspan="3" valign="top" bgcolor="#FFFFFF"><textarea name="enprocontent" cols="62" rows="20" style="display:none"></textarea>
<iframe id="ewebeditor" src="../Editor/ewebeditor.asp?id=enprocontent&style=s_red" frameborder="0" scrolling="No" width="585" height="350"></iframe></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="4" align="center" bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td height="30" align="center" bgcolor="#F6F6F6"><input name="Submits" type="submit" class="input" value="添加PDF" />
<input name="Submits" type="button" class="input" value="返回上页" onclick="javascript:history.back(-1)" /></td>
</tr>
</table></td>
</tr>
</form>
</table>
</body>
</html>
处理程序
if request("proname")="" or isEmpty(request("proname")) then%>
<script language=javascript>alert( "[ 操作提示 ]\n名称未填写,请返回填写名称!");location.href = "javascript:history.back()"</script>
<% ElseIf request("simage")="" or isEmpty(request("image")) Then %>
<script language=javascript>alert( "[ 操作提示 ]\n图片未上传,请返回上传图片!");location.href = "javascript:history.back()"</script>
<% ElseIf request("content")="" or isEmpty(request("content")) Then %>
<script language=javascript>alert( "[ 操作提示 ]\n内容未填写,请返回填写内容!");location.href = "javascript:history.back()"</script>
<% Else
set rs=server.createobject("adodb.recordset")
sql="select top 1 * from pdf"
rs.open sql,conn,1,3
rs.AddNew
rs("proname") = request ("proname")
rs("enproname") = request ("enproname")
rs("procontent") = request("content")
rs("enprocontent") = request("enprocontent")
rs.Update
rs.Close
set rs=nothing
conn.close
set conn=nothing
response.Write("<script language=javascript>alert('[ 操作提示 ]\n\nPDF添加成功!');location.href='pdf.asp'</script>")
end If
以上两段程序.
可去测试看下效果.一加就是两条一样的.
www.jm68.com/test
希望高手解决.感谢感谢再感谢!