紧急求助asp后台更换编辑器后点提交没反应

zdjs00 2018-10-27 09:25:58
原来的编辑器win7下不能用,所以升级了,网站公告可以正常编辑发布,但是新闻发布文章后点提交没反应,修改也一样,下面是新闻发布代码
<!--#include file = "../Inc/Syscode.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from News_NClass order by NClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("NClassName"))%>","<%= trim(rs("ClassID"))%>","<%= trim(rs("NClassID"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;

function changelocation(locationid)
{
document.myform.NClassID.length = 0;

var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.NClassID.options[document.myform.NClassID.length] = new Option(subcat[i][0], subcat[i][2]);
}
}

}
</script>
<title>Untitled Document</title>
<Script Language=JavaScript>
// 表单提交客户端检测
function doSubmit(){
if (document.myform.Title.value==""){
alert("新闻标题不能为空!");
return false;
}
// getHTML()为eWebEditor自带的接口函数,功能为取编辑区的内容
if (eWebEditor1.getHTML()==""){
alert("新闻内容不能为空!");
return false;
}
document.myform.submit();
}
</Script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../Inc/Admin_style.css" rel="stylesheet" type="text/css">
</head>

<body>

<form action="News_AddOK.asp" method="post" name="myform">

<table width="650" align=center cellspacing=3>
<tr>
<td width="75" align="right">新闻标题:</td>
<td width="560">
<input type="text" name="Title" value="" size="35">
  标题加色
<input type="checkbox" name="jiase" value="1"></td>
</tr>
<tr>
<td align="right">新闻栏目:</td>
<td><%
sql = "select * from News_Class"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%>
<select name="ClassID" onChange="changelocation(document.myform.ClassID.options[document.myform.ClassID.selectedIndex].value)" size="1">
<option selected value="<%=trim(rs("ClassID"))%>"><%=trim(rs("ClassName"))%></option>
<% dim selclass
selclass=rs("ClassID")
rs.movenext
do while not rs.eof
%>
<option value="<%=trim(rs("ClassID"))%>"><%=trim(rs("ClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
<select name="NClassID">
<%sql="select * from News_NClass where ClassID="&selclass
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
%>
<option selected value="<%=rs("NClassID")%>"><%=rs("NClassName")%></option>
<% rs.movenext
do while not rs.eof%>
<option value="<%=rs("NClassID")%>"><%=rs("NClassName")%></option>
<% rs.movenext
loop
end if
rs.close
set rs = nothing
conn.Close
set conn = nothing
%>
</select>
<font color="#ff6600">**</font></td>
</tr>
<tr>
<td align="right">新闻内容:</td>
<td> <input name="Content" type="hidden">
<IFRAME ID="eWebEditor1" SRC="../Editor/ewebeditor.htm?id=Content&style=standard650" FRAMEBORDER="0" SCROLLING="no" WIDTH="650" HEIGHT="350"></IFRAME>
</td>
</tr>
<tr>
<td align="right">标题图片:</td>
<td><input type="text" name="Picture" id="Picture"> </td>
</tr>
<tr>
<td align="right">文章关键词:</td>
<td><input name="keyword" type="text" id="keyword" size="50">
*必填 </td>
</tr>
<tr>
<td align="right">新闻摘自:</td>
<td><input name="CopyFrom" type="text" id="CopyFrom" onBlur="if (this.value =='') this.value='华北物流网'" onClick="if (this.value='华北物流网') this.value=''" value="华北物流网"></td>
</tr>
<tr>
<td align="right">新闻属性:</td>
<td>图文
<input type="checkbox" name="IncludePic" value="yes">
推荐
<input type="checkbox" name="Recommend" value="yes"> </td>
</tr>
</table>
<p align=center><input type=button name=btnSubmit value=" 提 交 " onClick="doSubmit()"> <input type=reset name=btnReset value=" 重 填 "></p>
</form>


</body>
</html>
...全文
221 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
zdjs00 2018-10-27
  • 打赏
  • 举报
回复
下面是News_AddOK.asp的代码
<!--#include file = "../Inc/Syscode.asp"-->
<%
'====================================================
'
'
'=====================================================
Dim i

Dim sNClassID,sClassID, sTitle, sContent,NID,jiase,keyword
sNClassID = Request.Form("NClassID")
sClassID = Request.Form("ClassID")
sTitle = Request.Form("Title")
jiase=Request.Form("jiase")
keyword=request.Form("keyword")
sContent = ""
For i = 1 To Request.Form("Content").Count
sContent = sContent & Request.Form("Content")(i)
Next

Dim sPicture, sCopyFrom, sIncludePic, sRecommend, sEditor
sPicture = Request.Form("Picture")
sCopyFrom = Request.Form("CopyFrom")
sIncludePic = Request.Form("IncludePic")
sRecommend = Request.Form("Recommend")
sEditor = Session("AdminName")

Dim NewsID,Rs,Sql
Set Rs = Server.CreateObject("ADODB.Recordset")
Sql = "Select * From NewsData"
Rs.Open Sql,Conn,1,3
Rs.AddNew
Rs("NClassID") = sNClassID
Rs("ClassID")= sClassID
Rs("Title") = sTitle
Rs("Content") = sContent
Rs("Picture") = sPicture
Rs("keyword")=keyword
if sCopyFrom="" then
Rs("CopyFrom") = ""
else
Rs("CopyFrom") = sCopyFrom
end if
if jiase="1" then
Rs("jiase") = true
else
Rs("jiase") = false
end if
if sIncludePic="yes" then
Rs("IncludePic") = true
else
Rs("IncludePic") = false
end if
Rs("Editor") = sEditor
if sRecommend="yes" then
Rs("Recommend") = true
else
Rs("Recommend") = false
end if

Rs.Update
NID=Rs("NewsID")
Rs.Close
Conn.Execute("UPDATE NewsData SET Updown="&NID&" WHERE NewsID="&NID&"")
response.Write "<script language='javascript'>alert('数据添加成功!');window.location.href='news_add.asp';</script>"
%>

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧