牛人帮忙啊?asp程序,转向不成功。
[code=text]
<form action ="?action=save" method=post name="theForm" id="theForm" onSubmit="return doCheck();">
<table cellspacing="1" cellpadding="4" width="90%" align="center" class="tableborder">
<tr>
<td colspan="2" class="header" align="center">添加信息</td>
</tr>
<tr>
<td class="altbg1" width="100">文章类别</td>
<td class="altbg2"><select name="tid">
<option value=""><-请选择文章类别-></option>
<%
Dim optioncase,tname,color,id,isselect
id=request("id")
if id<>"" then checkid(id)
Set Rs=Conn.Execute("select ID,Tname,tn,tj from "&Table_Pre&"_Class where tj>0 and include=1 order by ts")
Do While not rs.eof
tname=replace(rs("tname"),"|","->")
if rs("tj")=2 and rs("tn")<>"" then
i=i+1
if i=2 then
i=0
color="#FF0000"
else
color="#000000"
end if
end if
if rs("id")=clng(id) then isselect="selected"
optioncase=optioncase&"<option value='"&rs("id")&"' "&isselect&">"&tname&"</option>"
isselect=""
rs.MoveNext
loop
Rs.close:Set Rs = Nothing
Response.write optioncase%></select></td>
</tr>
<%
hid=rtnreplaceint(request("hid"),0)
lpname=changechr(request("lpname"))
if len(lpname)<2 then
slpname="请选择楼盘..."
else
slpname=lpname
end if
%>
<tr>
<td class="altbg1">文章标题</td>
<td class="altbg2"><input type="text" style="height: 20px; border: 1px solid #999999; background: url('../../Images/rule.gif')" maxLength="160" size="50" name="title" value="<%=request("title")%>">
<%Dim n
if id>0 then
Set Rs=Conn.Execute("Select Format from "&Table_Pre&"_Class where id="&id)
n=rs("Format")
Rs.Close:Set Rs=Nothing
else
n=1
End if
%>
<script language="JavaScript" type="text/javascript">
<!--
function ChkLink(){
if (document.getElementById('IsLink').checked == true) {
document.getElementById('ChkIsLink').style.display = '';
document.getElementById('ChkNoLink').style.display = 'none';
}else{
document.getElementById('ChkIsLink').style.display = 'none';
document.getElementById('ChkNoLink').style.display = '';
}
}
//-->
</script>
<tr>
<td width="100" align="right"><strong>转向链接:</strong></td>
<td><input name="IsLink" type="checkbox" id="IsLink" value="1" OnClick="ChkLink();"> 转向链接</td>
</tr>
<tr Id=ChkIsLink style="display:none;">
<td width="100" align="right"><strong>链接地址:</strong></td>
<td><input name="LinkUrl" type="text"
id="LinkUrl" value="" size="82" maxlength="255"> <font color="#FF0000">*</font><br /></td>
</tr>
<tr Id=ChkNoLink>
<td class="altbg1"><b>内容:</b><br>内容分页标签<br><font color=red>[分页标记]</font></td>
<td class="altbg2"><%
if editor_setting(0)="3" then
%>
<input type="hidden" name="fycon" value="">
<IFRAME ID="editor" style="max-width: 100%;height: auto;width: auto\9;" src="http://www.reader8.com/../Editor/Editor.asp?id=fycon&style=fy&TObj=TempUploadFiles" frameborder="0" scrolling="no" width="615" height="605"></IFRAME>
<%
else
Dim oEditor
Set oEditor = New Editor_Cls
oEditor.UserMode= 0'0为管理员模式,1为用户模式
oEditor.setEditMode= editor_setting(0)'使用什么编辑器,0-fckeditor编辑器,1-UBB编辑器(常规),2-UBB编辑器(专家),3-ewebeditor
oEditor.ChannelID= 1
oEditor.Width= editor_setting(2)
oEditor.Height= editor_setting(3)
oEditor.BasePath= "../../../"&editor_setting(4) '编辑器目录
oEditor.ToolbarSet= editor_setting(1)'编辑器模式Default,AdminMode,Simple,UserMode,Basic(默认,常规,简单,基本)
oEditor.Value =""
oEditor.InstanceName= "fycon"
oEditor.Execute()
Set oEditor = Nothing
end if
%></td>
</tr>
<tr>
<td class="altbg1">缩略图</td>
<td class="altbg2">
<input name="Spic" type="text" id="Spic" size="70" value=""><input id="Slide" type="checkbox" value="1" name="Slide"> 幻灯
<%if editor_setting(0)="0" then%><input type="hidden" name="UploadFileList" id="UploadFileList" onChange="doChange(this,document.theForm.TempUploadFiles)" value=""><input type="checkbox" name="AutoRemote" value='1' onClick="remoteUpload(this.checked);"> 自动保存远程图片<%end if%>
<br>
<iframe style="top:2px" ID="UpFile" style="max-width: 100%;height: auto;width: auto\9;" src="http://www.reader8.com/../inc/Upload.asp?MID=1&Type=0&Obj=spic&Obj2=&fy_channel=news&TObj=TempUploadFiles&intoeditor=1&inst=fycon" frameborder=0 scrolling=no width="330" height="25" name="I1"></iframe></td>
</tr>
<tr>
<td class="altbg1" colspan="2" align="center"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" width="25">已<br>
上<br>
传<br>
图<br>
片</td>
<td align="center">
<select name="TempUploadFiles" id="TempUploadFiles" style="width:324;height:121" size="2" onclick="doPreview('TempUploadFiles','<%=fcml%>','<%=upload0%>')">
</select><br>
<input type="button" name="SetDefaultPic" value="设为标题图片" onClick="SetPicUrl('TempUploadFiles','spic');">
<input type="hidden" name="UploadFiles" value=""></td>
<td align="center" valign="top"><fieldset style="height:100%">
<legend>预览</legend>
<table border=0 cellpadding=0 cellspacing=1 width="180" height="100" valign=top>
<tr><td align=center valign=middle id=tdPreview height="100%">
</td></tr>
</table>
</fieldset></td>
</tr>
</table></td>
</tr> <tr>
<td class="altbg1">Html文件名</td>
<td class="altbg2">默认 <a onclick='javascript:toggle()' title="自定义生成文件的名称,请确认不要和以前的重复">点击自定义</a> <input type="text" style='visibility:hidden;' size=25 name="html">默认格式:<select name=Vip>
<option value=".Html">.Html</option>
</select><input type="checkbox" name="makehtml" value="yes" checked>立即生成</td>
</tr>
<tr>
<td colspan="2" align="center" class="altbg1"> <input type="submit" name="submit" value="确定添加"><br>
<br>
<br>
</td>
</tr>
</table>
</form>[code]
大家帮个忙啊。转向连接出问题了。 总是生成错误的单页。转向连接无用了。
[解决办法]
?action=save改为*.asp?action=save 提交保存结果最后在另一个页面保存,不要放在同一页处理。