[size=large][color=blue]我用的struts1,在action跳转到一个页面,这个页面也就是提交的输入页面,里面有个新浪编辑器,返回来的时候别的输入框都显示,这个新浪编辑器怎么不显示呢,显示的是找不到网页。[/color][/size]
[b]问题补充:[/b]
<%@ include file="/common/taglibs.jsp"%>
<%@ page pageEncoding="GBK"%>
scope="request">
/jsp:useBean
工作动态添加
<br> function load(){</p> <pre><code> var type = <%=request.getParameter("type")%> if(type == 1){ document.getElementById("biaotou").innerHTML = "添加 机构介绍模块 文章"; }else if(type == 2){ document.getElementById("biaotou").innerHTML = "添加 工作动态模块 文章"; }else if(type == 3){ document.getElementById("biaotou").innerHTML = "添加 全国性文件模块 文章"; }else if(type == 4){ document.getElementById("biaotou").innerHTML = "添加 省部文件模块 文章"; }else if(type == 5){ document.getElementById("biaotou").innerHTML = "添加 中心文件模块 文章"; }else if(type == 6){ document.getElementById("biaotou").innerHTML = "添加 归集模块 文章"; }else if(type == 7){ document.getElementById("biaotou").innerHTML = "添加 提取模块 文章"; }else if(type == 8){ document.getElementById("biaotou").innerHTML = "添加 贷款模块 文章"; }else if(type == 9){ document.getElementById("biaotou").innerHTML = "添加 联名卡模块 文章"; }else if(type == 10){ document.getElementById("biaotou").innerHTML = "添加 行风建设模块 文章"; }else if(type == 11){ document.getElementById("biaotou").innerHTML = "添加 对外承诺模块 文章"; }else if(type == 12){ document.getElementById("biaotou").innerHTML = "添加 意见建议模块 文章"; }else if(type == 13){ document.getElementById("biaotou").innerHTML = "添加 财务公报模块 文章"; }else if(type == 14){ document.getElementById("biaotou").innerHTML = "添加 网上课堂模块 文章"; } } function addnew() { if(document.getElementById("title").value == "") { alert("标题不能为空"); document.getElementById("title").focus(); return false; } if(document.getElementById("department").value == null || document.getElementById("department").value == "0"){ alert("请选择管理部"); document.getElementById("department").focus(); return false; } if(document.getElementById("source").value == "") { alert("来源不能为空"); document.getElementById("source").focus(); return false; } if(document.getElementById("content").value == "") { alert("内容不能为空"); return false; } var type = <%=request.getParameter("type")%>; if(type == 1){ document.forms[0].type.value = "1"; document.forms[0].typename.value = "机构介绍"; }else if(type == 2){ document.forms[0].type.value = "2"; document.forms[0].typename.value = "工作动态"; }else if(type == 3){ document.forms[0].type.value = "3"; document.forms[0].typename.value = "全国性文件"; }else if(type == 4){ document.forms[0].type.value = "4"; document.forms[0].typename.value = "省部文件"; }else if(type == 5){ document.forms[0].type.value = "5"; document.forms[0].typename.value = "中心文件"; }else if(type == 6){ document.forms[0].type.value = "6"; document.forms[0].typename.value = "归集模块"; }else if(type == 7){ document.forms[0].type.value = "7"; document.forms[0].typename.value = "提取"; }else if(type == 8){ document.forms[0].type.value = "8"; document.forms[0].typename.value = "贷款"; }else if(type == 9){ document.forms[0].type.value = "9"; document.forms[0].typename.value = "联名卡"; }else if(type == 10){ document.forms[0].type.value = "10"; document.forms[0].typename.value = "行风建设"; }else if(type == 11){ document.forms[0].type.value = "11"; document.forms[0].typename.value = "对外承诺"; }else if(type == 12){ document.forms[0].type.value = "12"; document.forms[0].typename.value = "意见建议"; }else if(type == 13){ document.forms[0].type.value = "13"; document.forms[0].typename.value = "财务公报"; }else if(type == 14){ document.forms[0].type.value = "14"; document.forms[0].typename.value = "网上课堂"; } contentForm.submit(); } function goback() { var type = <%=request.getParameter("type")%>; if(type == 1){ window.location.href = "jgjs/jgjs.jsp"; }else if(type == 2){ window.location.href = "gzdt/gzdt.jsp"; }else if(type == 3){ window.location.href = "zcfg/qgwj.jsp"; }else if(type == 4){ window.location.href = "zcfg/sbwj.jsp"; }else if(type == 5){ window.location.href = "zcfg/zxwj.jsp"; }else if(type == 6){ window.location.href = "gjjyw/gj.jsp"; }else if(type == 7){ window.location.href = "gjjyw/tq.jsp"; }else if(type == 8){ window.location.href = "gjjyw/dk.jsp"; }else if(type == 9){ window.location.href = "gjjyw/lmk.jsp"; }else if(type == 10){ window.location.href = "zwgk/hfjs.jsp"; }else if(type == 11){ window.location.href = "zwgk/dwcn.jsp"; }else if(type == 12){ window.location.href = "zwgk/yjjy.jsp"; }else if(type == 13){ window.location.href = "zwgk/cwgk.jsp"; }else if(type == 14){ window.location.href = "zwgk/wskt.jsp"; } } </code></pre> <p>
</head>
<body bgcolor="#d9e7f8" onload="load()">
<html:form action="addnew.do?method=save" method="post">
<table width="700" border="0" align="left">
<tr>
<td height="25" style="font-size: 12px;" align="left" colspan="3">
<strong><FONT color="red">
<logic:present name="errmsg">
<bean:write name="errmsg"/>
</logic:present>
</FONT></strong>
</td>
</tr>
<tr>
<td colspan="4" align="center">
<b><div id="biaotou" style="font-size: 15px"></div> </b>
</td>
</tr>
<tr>
<td height="30" style="font-size: 12px" align="right">
标题:
</td>
<td>
<input type="text" id="title" name="title" size="50" />
</td>
<td align="right" style="font-size: 12px">
管理部:
</td>
<td>
<select name="department" id="department" style="width:140">
<option value="0">
请选择管理部
</option>
<%=jgjsBean.select_cxglb(out)%>
</select>
</td>
</tr>
<tr>
<td height="30" style="font-size: 12px" align="right">
来源:
</td>
<td>
<input type="text" id="source" name="source" size="50" />
</td>
<td colspan="2">
<input type="button" value="保 存" onclick="addnew();" /> <input type="button" onclick="goback();" value="返回" />
</td>
</tr>
<tr>
<td valign="top" style="font-size: 12px" align="right">
内容:
</td>
[color=blue]//这里这个iframe就是调用新浪编辑器的,只要能跳转回来正常显示就行[/color]
</td>
</tr>
</table>
</html:form>
</body>
[b]问题补充:[/b]
下面那个addNew.jsp就是输入页,也是返回页
[b]问题补充:[/b]
图片是这样的
那应该是你的editor/editor.htm这个地址不对
写成相对web根目录的地址
你的web应用的目录结构是怎么样的,截个图
可能是新浪编辑器不支持这么直接设值的,要用js给它设值,看它的api接口
你把数据显示在新浪编辑器是怎么写的
你先测试下
addNew.jsp页面就只包含下面这个标签,其它都去掉,看能不能显示
相对与绝对url吧,