taitoushan 2009-08-26 08:22
浏览 199
已采纳

在action转向一个页面之后,为啥我的输入框不显示了?

[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 = &lt;%=request.getParameter(&quot;type&quot;)%&gt; if(type == 1){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 机构介绍模块 文章&quot;; }else if(type == 2){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 工作动态模块 文章&quot;; }else if(type == 3){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 全国性文件模块 文章&quot;; }else if(type == 4){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 省部文件模块 文章&quot;; }else if(type == 5){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 中心文件模块 文章&quot;; }else if(type == 6){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 归集模块 文章&quot;; }else if(type == 7){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 提取模块 文章&quot;; }else if(type == 8){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 贷款模块 文章&quot;; }else if(type == 9){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 联名卡模块 文章&quot;; }else if(type == 10){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 行风建设模块 文章&quot;; }else if(type == 11){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 对外承诺模块 文章&quot;; }else if(type == 12){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 意见建议模块 文章&quot;; }else if(type == 13){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 财务公报模块 文章&quot;; }else if(type == 14){ document.getElementById(&quot;biaotou&quot;).innerHTML = &quot;添加 网上课堂模块 文章&quot;; } } function addnew() { if(document.getElementById(&quot;title&quot;).value == &quot;&quot;) { alert(&quot;标题不能为空&quot;); document.getElementById(&quot;title&quot;).focus(); return false; } if(document.getElementById(&quot;department&quot;).value == null || document.getElementById(&quot;department&quot;).value == &quot;0&quot;){ alert(&quot;请选择管理部&quot;); document.getElementById(&quot;department&quot;).focus(); return false; } if(document.getElementById(&quot;source&quot;).value == &quot;&quot;) { alert(&quot;来源不能为空&quot;); document.getElementById(&quot;source&quot;).focus(); return false; } if(document.getElementById(&quot;content&quot;).value == &quot;&quot;) { alert(&quot;内容不能为空&quot;); return false; } var type = &lt;%=request.getParameter(&quot;type&quot;)%&gt;; if(type == 1){ document.forms[0].type.value = &quot;1&quot;; document.forms[0].typename.value = &quot;机构介绍&quot;; }else if(type == 2){ document.forms[0].type.value = &quot;2&quot;; document.forms[0].typename.value = &quot;工作动态&quot;; }else if(type == 3){ document.forms[0].type.value = &quot;3&quot;; document.forms[0].typename.value = &quot;全国性文件&quot;; }else if(type == 4){ document.forms[0].type.value = &quot;4&quot;; document.forms[0].typename.value = &quot;省部文件&quot;; }else if(type == 5){ document.forms[0].type.value = &quot;5&quot;; document.forms[0].typename.value = &quot;中心文件&quot;; }else if(type == 6){ document.forms[0].type.value = &quot;6&quot;; document.forms[0].typename.value = &quot;归集模块&quot;; }else if(type == 7){ document.forms[0].type.value = &quot;7&quot;; document.forms[0].typename.value = &quot;提取&quot;; }else if(type == 8){ document.forms[0].type.value = &quot;8&quot;; document.forms[0].typename.value = &quot;贷款&quot;; }else if(type == 9){ document.forms[0].type.value = &quot;9&quot;; document.forms[0].typename.value = &quot;联名卡&quot;; }else if(type == 10){ document.forms[0].type.value = &quot;10&quot;; document.forms[0].typename.value = &quot;行风建设&quot;; }else if(type == 11){ document.forms[0].type.value = &quot;11&quot;; document.forms[0].typename.value = &quot;对外承诺&quot;; }else if(type == 12){ document.forms[0].type.value = &quot;12&quot;; document.forms[0].typename.value = &quot;意见建议&quot;; }else if(type == 13){ document.forms[0].type.value = &quot;13&quot;; document.forms[0].typename.value = &quot;财务公报&quot;; }else if(type == 14){ document.forms[0].type.value = &quot;14&quot;; document.forms[0].typename.value = &quot;网上课堂&quot;; } contentForm.submit(); } function goback() { var type = &lt;%=request.getParameter(&quot;type&quot;)%&gt;; if(type == 1){ window.location.href = &quot;jgjs/jgjs.jsp&quot;; }else if(type == 2){ window.location.href = &quot;gzdt/gzdt.jsp&quot;; }else if(type == 3){ window.location.href = &quot;zcfg/qgwj.jsp&quot;; }else if(type == 4){ window.location.href = &quot;zcfg/sbwj.jsp&quot;; }else if(type == 5){ window.location.href = &quot;zcfg/zxwj.jsp&quot;; }else if(type == 6){ window.location.href = &quot;gjjyw/gj.jsp&quot;; }else if(type == 7){ window.location.href = &quot;gjjyw/tq.jsp&quot;; }else if(type == 8){ window.location.href = &quot;gjjyw/dk.jsp&quot;; }else if(type == 9){ window.location.href = &quot;gjjyw/lmk.jsp&quot;; }else if(type == 10){ window.location.href = &quot;zwgk/hfjs.jsp&quot;; }else if(type == 11){ window.location.href = &quot;zwgk/dwcn.jsp&quot;; }else if(type == 12){ window.location.href = &quot;zwgk/yjjy.jsp&quot;; }else if(type == 13){ window.location.href = &quot;zwgk/cwgk.jsp&quot;; }else if(type == 14){ window.location.href = &quot;zwgk/wskt.jsp&quot;; } } </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">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="button" value="保 存" onclick="addnew();" />&nbsp;&nbsp;<input type="button" onclick="goback();" value="返回" />
                </td>
            </tr>
            <tr>
                <td valign="top" style="font-size: 12px" align="right">
                    内容:
                </td>

[color=blue]//这里这个iframe就是调用新浪编辑器的,只要能跳转回来正常显示就行[/color]


[color=red]
src="editor/editor.htm?id=content&ReadCookie=0" frameborder="0"
scrolling="no" width="621" height="457">[/color]






                </td>
            </tr>
        </table>
    </html:form>
</body>


[b]问题补充:[/b]
下面那个addNew.jsp就是输入页,也是返回页
[b]问题补充:[/b]
图片是这样的

  • 写回答

5条回答 默认 最新

  • wanghaolovezlq 2009-08-26 08:44
    关注

    那应该是你的editor/editor.htm这个地址不对
    写成相对web根目录的地址

    你的web应用的目录结构是怎么样的,截个图

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制