主题:Asp后台修改新闻模块,读取不到新闻模块
原来数据库News,修改页面News_modi.asp。
修改内容处代码:<iframe ID="editor" src="../editor.asp?Action=News&ID=<%=ID%>" frameborder=1 scrolling=no width="620" height="405"></iframe>
现改数据库Others,修改页面Others_modi.asp
修改内容处代码改为::<iframe ID="editor" src="../editor.asp?Action=Others&ID=<%=ID%>" frameborder=1 scrolling=no width="620" height="405"></iframe>后,后台编辑内容时,所需修改的内容看不到,请高手指点哪里的问题,该如何修改,谢谢
News_modi.asp:
<%@language=vbscript codepage=936 %>
<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<!--#include file="../Inc/Ubbcode.asp"-->
<!--#include file="Inc/Function.asp"-->
<%
dim ID,rs_news,FoundErr,ErrMsg
dim sql
dim count
ID=trim(request("ID"))
FoundErr=False
if ID="" then
response.Redirect("News_Manage.asp")
end if
sql="select * from News where ID=" & ID & ""
Set rs_news= Server.CreateObject("ADODB.Recordset")
rs_news.open sql,conn,1,1
if FoundErr=True then
call WriteErrMsg()
else
%>
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from SmallClass_New order by SmallClassID asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("BigClassName"))%>","<%= trim(rs("SmallClassName"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.SmallClassName.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.SmallClassName.options[document.myform.SmallClassName.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
function AddItem(strFileName){
document.myform.IncludePic.checked=true;
document.myform.DefaultPicUrl.value=strFileName;
document.myform.DefaultPicList.options[document.myform.DefaultPicList.length]=new Option(strFileName,strFileName);
document.myform.DefaultPicList.selectedIndex+=1;
if(document.myform.UploadFiles.value=='){
document.myform.UploadFiles.value=strFileName;
}
else{
document.myform.UploadFiles.value=document.myform.UploadFiles.value+"|"+strFileName;
}
}
function CheckForm()
{
if (editor.EditMode.checked==true)
document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
else
document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML;
if (document.myform.title.value.length == 0) {
alert("新闻标题没有填写.");
document.myform.title.focus();
return false;
}
if (document.myform.user.value.length == 0) {
alert("新闻发布人没有填写");
document.myform.user.focus();
return false;
}
return true;
}