请教高手~~~~一个奇怪问题~

rock189 2004-05-09 06:10:10
我有个在线编辑的页面,文本框初始值是从数据库读出来的,打开修改内容之后保存到数库据,但重新进入该页面显示的是还没修改之前的内容,在刷新之后才会显示新的内容.

打开该页面好像不会运行读取数据的程序,这是怎么回事??
...全文
21 点赞 收藏 9
写回复
9 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
rock189 2004-05-10
:( 怎么没办法吗?急死我了
回复
rock189 2004-05-10
顶一顶
回复
dongpo1 2004-05-09
把你得代码缩一下 贴出来 我们也容易看出 BUG
回复
rock189 2004-05-09
有啊
回复
liuyangxuan 2004-05-09
传送记录ID值了吗?
回复
rock189 2004-05-09
没办法啊,我又是新手,还什么都不懂,请帮帮忙
回复
UNICEA 2004-05-09
太多了,
回复
rock189 2004-05-09
<!--#include file=hyconn.asp-->
<!--#include file=subbdw.asp-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<TD bgColor=#666666 colSpan=2></TD>
<% dim lm
lm=request.querystring("lm")
set rs=server.createobject("adodb.recordset")
sql="select * from txt where lm='"&lm&"'"
rs.open sql,conn,1,1
content=rs("content")
contentname=rs("contentname")
rs.close
set rs=nothing
%>
<HTML><HEAD><TITLE>深圳市宝鼎威货运有限公司</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=JavaScript type=text/JavaScript>
function deleteitem(){
if (confirm('Delete this content item?')) self.location.href='search.asp?kill=55';
}
</SCRIPT>

<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY onload=javascript:LoadContent(); bgcolor="#FFFFFF">

<FORM name=form1 action="editlmserver.asp?lm=<%=lm%>" method="post">
<TABLE cellSpacing=1 cellPadding=2 width="96%" align=center border=0>
<TBODY>
<TR bgcolor="eeeeee">
<TD width="17%" bgcolor="eeeeee"><font size="2"><img height=20
src="file:///D|/asp/htmledit/在线编辑图片上传硬盘/edit.files/icEdititem.gif" width=19 align=absMiddle>在线编辑修改</font></TD>
<TD width="83%" valign="middle">
<div align="right"><font color="#FF9900" size=2> <strong>宝鼎威栏目管理系统</strong></font></div></TD>
</TR>
<TR vAlign=top align=left>
</TR>
<TR vAlign=top align=left>
<TD width="17%" bgColor=#eeeeee>
<div align="right"><font size="2">标题</font></div>
</TD>
<TD width="83%" bgColor=#efeff7><FONT
size=2><B>
<INPUT id=contentname maxLength=250 size=50 name=contentname value=<%=contentname%>>
</B></FONT></TD>
</TR>
<TR vAlign=top align=left>
<TD bgColor=#eeeeee width="17%">
<div align="right"><font size="2" color="#FFFFFF"><font color="#000000">内容</font></font></div>
</TD>
<TD bgColor=#efeff7 width="83%">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><FONT size=2>
<INPUT
onclick=javascript:htmleditor(); type=radio CHECKED value=0
name=whicheditor>
HTML 模式
<INPUT
onclick=javascript:texteditor(); type=radio value=1
name=whicheditor>
文本模式</FONT></TD>
</TR>
<TR id=thetexteditor style="DISPLAY: none">
<TD> <FONT size=2><B>
<textarea name="content" cols="50" rows=12 id="content"><%=content%></textarea>
<INPUT id="autoformat" type="checkbox" value="checked" name="autoformat">
取消自动分段格式</B><BR>
<FONT size=2
>当你直接编辑HTML代码时,请选择此项.
</FONT></FONT></TD>
</TR>
<TR id=thehtmleditor>
<TD>
<SCRIPT language=JavaScript src="edit.files/yusasp_ace.js"></SCRIPT>
<SCRIPT language=JavaScript src="edit.files/yusasp_color.js"></SCRIPT>
<SCRIPT>
function SubmitForm()
{
//STEP 9: Before getting the edited content, the display mode of the editor
//must not in HTML view.
if(obj1.displayMode == "HTML")
{
alert("请选择非HTML代码编辑再保存")
return ;
}

//STEP 10: Here we move the edited content & style into form fields.
if (document.getElementById("thehtmleditor").style.display!='none'){
form1.content.value = obj1.getContentBody() //move edited content into form field, to be submitted.
}

form1.submit()
}

function LoadContent()
{
obj1.putContent(form1.content.value)
}

function transferContent()
{
form1.content.value=obj1.getContentBody();
}

function texteditor(){
transferContent();
document.getElementById("thetexteditor").style.display='';
document.getElementById("thehtmleditor").style.display='none';
}

function htmleditor(){
LoadContent();
document.getElementById("thetexteditor").style.display='none';
document.getElementById("thehtmleditor").style.display='';
}
</SCRIPT>
<SCRIPT>
var obj1 = new ACEditor("obj1")
obj1.width = "100%" //editor width
obj1.height = 360 //editor height
obj1.ImagePageURL = "selimage.asp" //specify Image library management page
//obj1.PageStyle = "ace_document.css"; //apply external css to the document
obj1.PageStylePath_RelativeTo_EditorPath = "style/"; //location of the external css (relative to the editor)
obj1.isFullHTML = false //edit full HTML (not just BODY)s
obj1.RUN() //show
</SCRIPT>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR vAlign=top align=left>
<TD bgColor=#eeeeee width="17%">
<INPUT type=hidden value=55 name=contentid>
</TD>
<TD bgColor=#efeff7 width="83%">
<input id=Button12 onClick=SubmitForm() type=button name=Button1 value="保存内容">
</TD>
</TR>
<TR vAlign=top align=left>
<TD bgColor=#666666 colSpan=2></TD>
</TR>
</TBODY>
</TABLE>
</FORM>
</BODY></HTML>

以上就是该页面的代码
回复
TSD 2004-05-09
代码呢?
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2004-05-09 06:10
社区公告
暂无公告