首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

HTML编辑器.替换成EWEB编辑器的有关问题

2012-03-03 
HTML编辑器.替换成EWEB编辑器的问题我的一个文件,原来用的是简单的HTML编辑器.现在想替换成EWEB编辑器.可

HTML编辑器.替换成EWEB编辑器的问题
我的一个文件,原来用的是简单的HTML编辑器.现在想替换成EWEB编辑器.可是,替换后,编辑器里的内容提交进数据库是空的   部分源码如下
<form   action= "imenu_edit.asp?sign0=1&im_id= <%=im_id%> &sign= <%=sign%> "   id=FORM1   method=post   name=FORM1>
<center>
            <table   border=1   cellpadding=0   cellspacing=0   width= "98% "   bordercolor= "#FFFFFF ">
            <tr>  
                <td   height= "35 "   bordercolor= "#CCCCCC ">   修改该子栏目名称:  
                    <input   id=text1   name=im_name   value= <%=im_name%> >
                    <input   type=hidden   name=user_id   value= <%=user_id%> >
                </td>
            </tr>
            <tr>  
            <tr>  
                <td   height= "30 "   bordercolor= "#CCCCCC "> 添入内容 </td>
            </tr>
            <tr>  
            <tr>  
                <td   bordercolor= "#CCCCCC ">  
                    <input   name=content   type=hidden   >
                    <!--     代码编辑器-->
                    <input   id=Hidden1   name=body   type=hidden   >
                    <textarea   name= "oldContent "   cols= "0 "   rows= "0 "   style= "display:none "> </textarea>
                    <script>
  strHTML= " ";
            if((window.navigator.userAgent.indexOf( "IE   5 ")   >   1)   ||   (window.navigator.userAgent.indexOf( "IE   6 ")   >   1))   {
                            document.write( ' <iframe   ID= "editor "   NAME= "editor "   style= "width:   100%;   height:255;display:none "> </iframe> ');
                            document.write( ' <div   id= "switchDiv "   style= "padding:   0;margin:   0;width:   100% "> <table   border= "0 "   cellspacing= "0 "   cellpadding= "0 "   width= "100% "   style= "background-color:buttonface "> ');
                            document.write( ' <tr> <td   id= "status1 "> <map   name= "switch1 "> ');


                            document.write( ' <area   onclick= "switchstatus(2) "   shape= "polygon "   coords= "50,   1,   46,   7,   50,   14,   90,   14,   95,   2 "> ');
                            document.write( ' <area   onclick= "switchstatus(3) "   shape= "polygon "   coords= "128,   13,   134,   0,   96,   0,   93,   10,   96,   14 "> ');
                            document.write( ' </map> <img   SRC= "images/normal.gif "   height= "15 "   width= "135 "   usemap= "#switch1 "   border= "0 "> ');
                            document.write( ' </td> <td   id= "status2 "   style= "display:none "> <map   name= "switch2 "> ');
                            document.write( ' <area   onclick= "switchstatus(1) "   shape= "polygon "   coords= "5,   3,   12,   14,   43,   14,   49,   6,   43,   0 "> ');
                            document.write( ' <area   onclick= "switchstatus(3) "   shape= "polygon "   coords= "97,   0,   94,   7,   98,   14,   127,   14,   134,   0 "> ');
                            document.write( ' </map> <img   SRC= "images/html.gif "   height= "15 "   width= "135 "   usemap= "#switch2 "   border= "0 "> ');
                            document.write( ' </td> <td   id= "status3 "   style= "display:none "> <map   name= "switch3 "> ');
                            document.write( ' <area   onclick= "switchstatus(1) "   shape= "polygon "   coords= "3,   2,   10,   14,   41,   14,   50,   0 "> ');
                            document.write( ' <area   onclick= "switchstatus(2) "   shape= "polygon "   coords= "87,   14,   91,   5,   87,   0,   50,   0,   46,   9,   49,   14 "> ');
                            document.write( ' </map> <img   SRC= "images/preview.gif "   height= "15 "   width= "135 "   usemap= "#switch3 "   border= "0 "> </td> ');
                            document.write( ' <td> <img   src= "images/scrolll.gif "   height=15   width=24> </td> <td   width= "100% "   style= "background-color:white;filter:Alpha(opacity=50); "> &nbsp;   </td> <td> <img   src= "images/scrollr.gif "   height=15   width=24> </td> </tr> </table> </div> ');


            }
            function   switchstatus(flag){
                            document.frames.editor.frames.edit1.swapModes(flag);
                            var   i;
                            for(i=1;i <4;i++){
                                            document.all[ "status "   +   i].style.display   =   "none ";
                            }
                            document.all[ "status "   +   flag].style.display   =   "block ";
            }
            function   winhidden(){
                            if   (confirm( "您确信要放弃所有改动退出吗?\n退出后将无法保存您所做的改动。 ")){
                                            document.all.editor.src   =   " ";
                                            window.close();
                            }
            }
            function   win_init(){
                            document.all.editor.src   =   "edit.htm ";
                            window.status   =   "程序载入中,请等待…… ";
                           
            }
            function   save(){
                            document.frames.editor.savefile();
            }
            function   test123(ttt){
                            document.frames.editor.init1(ttt);
            }
            window.onload   =   win_init
           
            function   UploadComplete(URL){
                            if   ((URL   !=   null)   &&   (URL   !=   " "))
                                            if   (URL.indexOf( ": ")   ==   -1)
                                                            doFormat( "InsertImage ",   "http:// "   +   URL);


                                            else
                                                            doFormat( "InsertImage ",   URL);
                            document.all.UploadImg.style.display   =   "none ";
                            document.forms[ "upload "].reset();
            }
            </script>
                </td>
            </tr>
            <input   type= "hidden "   id=text2   name=im_type_new   value= <%=im_type_new%> >
            <tr>  
                <td   bordercolor= "#CCCCCC "   height= "44 ">  
                    <div   align= "center ">  
                        <input   name=Submit225   onClick= "save();document.forms[0].content.value=document.forms[0].body.value; "   style= "BACKGROUND-COLOR:   #b6c5d8 "   type=submit   value=发布>
                    </div>
                </td>
            </tr>
                </table>
    </center> </form>

[解决办法]
<form action= "imenu_edit.asp?sign0=1&im_id= <%=im_id%> &sign= <%=sign%> " id=FORM1 method=post name=FORM1>
<center>
<table border=1 cellpadding=0 cellspacing=0 width= "98% " bordercolor= "#FFFFFF ">
<tr>
<td height= "35 " bordercolor= "#CCCCCC "> 修改该子栏目名称:
<input id=text1 name=im_name value= <%=im_name%> >
<input type=hidden name=user_id value= <%=user_id%> >
</td>
</tr>
<tr>
<tr>
<td height= "30 " bordercolor= "#CCCCCC "> 添入内容 </td>
</tr>
<tr>
<tr>
<td bordercolor= "#CCCCCC ">
<textarea name= "oldContent " cols= "0 " rows= "0 " style= "display:none "> </textarea>
<IFRAME ID= "eWebEditor1 " SRC= "ewebeditor/ewebeditor.asp?id=oldContent&style=s_mini1 " FRAMEBORDER= "0 " SCROLLING= "no " WIDTH= "100% " HEIGHT= "350 "> </IFRAME>

</td>
</tr>
<input type= "hidden " id=text2 name=im_type_new value= <%=im_type_new%> >
<tr>
<td bordercolor= "#CCCCCC " height= "44 ">


<div align= "center ">
<input name=Submit225 onClick= "submit() " style= "BACKGROUND-COLOR: #b6c5d8 " type=submit value=发布>
</div>
</td>
</tr>
</table>
</center> </form>
你修改一下eWeb的目录,和Style

热点排行