Hi ,
I an using CKEditor 3.x with my classic ASP project.it works fine wheni first load the page but CKEditor doesnt replace when I post form. I ve got Error code : Exception thrown and not caught (ckeditor.js Line :25 Char : 1784)
how can i fix this ?
here is the my code :
******* ASP PAGE ******* THIS PAGE CCONTENT LOADING INSIDE ajaxpage DIV ELEMENT <%@LANGUAGE="VBSCRIPT"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//KO" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-utf-8"> <title>ANNOUNCEMENTS</title> </head> <body> <%if request("sayfa")<=0 then hangisayfa=1 else hangisayfa=request("sayfa")%> <% if request("d")="" or request("d")=0 then sql="select * from duyurular where did=0" else sql="select * from duyurular where did=" & request("d") end if rs.open sql,conn,1,3 if rs.eof then rs.close %> <form id="announceform" name="announceform" method="post" onSubmit="javascript:SaveRecord('duyurular.asp?k=1&d=0&sayfa=<%=request("sayfa")%>','announceform');"> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="2"> <tr> <td><div align="left">Duyuru İçeriği :</div></td> </tr> <tr> <td><div align="center"> <textarea name="icerik" cols="70" rows="3" id="icerik" style="width:100%;height:250px"></textarea> </div> </td> </tr> <tr> <td colspan="3"><div align="right"> <input type="submit" name="Submit" value="Kaydet" <%if session("write")<>"on" then response.Write("disabled")%>> </div></td> </tr> </table> </form> <%Else%> <form id="announceform" name="announceform" method="post" onSubmit="javascript:SaveRecord('duyurular.asp?k=1&d=<%=rs("did")%>&sayfa=<%=request("sayfa")%>','announceform');"> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="2"> <tr> <td><div align="left">Duyuru İçeriği :</div></td> </tr> <tr> <td><div align="center"> <textarea name="icerik" cols="70" rows="3" id="icerik" style="width:100%;height:250px"><%=rs("icerik")%></textarea> </div> </td> </tr> <tr> <td colspan="3"><div align="right"> <input type="submit" name="Submit" value="Güncelle" <%if session("write")<>"on" then response.Write("disabled")%>> </div></td> </tr> </table> </form> <% rs.close End if %> <br> <% toplamk=0 kacsayfa=0 kalan=0 sql="select count(did) as tk from duyurular" rs.open sql,conn,1,3 toplamk=cint(rs("tk")) rs.close kacsayfa=int(toplamk / 25) kalan=toplamk mod 25 if kalan>0 then kacsayfa=kacsayfa+1 'kacsayfa=int(cint(toplamk) / 25) 'if (kacsayfa mod 25)>0 then kacsayfa=kacsayfa+1 %> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="2"> <tr> <td height="25" colspan="2"><div align="center"></div></td> <td height="25" colspan="3"> <form id="announcepager" name="announcepager" method="post"> <div align="right">Sayfa : <select name="sayfa" onChange="javascript:Pager('duyurular.asp?sayfa=','sayfa');"> <% for say=1 to kacsayfa %> <option <%if cint(say)=cint(hangisayfa) then response.Write("Selected")%> ><%=say%></option> <%next%> </select> </div> </form> </td> </tr> <tr class="listelerenkli11"> <td width="30" height="25"><div align="center">No.</div></td> <td><div align="center">Duyurular</div></td> <td width="120"><div align="center">Son Güncelleme </div></td> <td colspan="2"><div align="center">İşlemler</div></td> </tr> <% sql="select * from duyurular order by gnc DESC Limit " & (hangisayfa-1) * 25 & " , 25" rs.open sql,conn,1,3 While not rs.eof i=i+1 k=i mod 2 if k=0 then renk="listelerenkli12" else renk="listelerenkli13" %> <tr class="<%=renk%>" height="20"> <td><div align="center"><%=(hangisayfa * 25) - (25 - i)%></div></td> <td><div align="left"><%=rs("icerik")%><br><br></td> <td><div align="center"><%=rs("gnc")%></div></td> <td width="30"><div align="center"> <%if session("write")="on" then%> <a href="javascript:SendProccess('duyurular.asp?d=<%=rs("did")%>&sayfa=<%=request("sayfa")%>','Announcement waiting for edit.');"><img src="images/001_45.gif" width="24" height="24" border="0"></a> <%Else%> <img src="images/001_45.gif" width="24" height="24" border="0"> <%End if%> </div></td> <td width="30"><div align="center"> <%if session("delete")="on" then%> <a href="javascript:DeleteProccess('duyurular.asp?s=1&d=<%=rs("did")%>&sayfa=<%=request("sayfa")%>','Announcement ID : <%=rs("did")%>');"><img src="images/001_05.gif" width="24" height="24" border="0" /></a> <%Else%> <img src="images/001_05.gif" width="24" height="24" border="0"> <%End if%> </div></td> </tr> <% rs.movenext Wend rs.close %> </table> <script type="text/javascript"> CKLoad('icerik'); </script> </body> </html> ****** MY Javascript functions ******* I am using this code when i first time load this ASP page : document.getElementById('islem').innerHTML='<img src="images/loading.gif" width="16" height="16" align="absmiddle" />'+' Page is loading...' ; htmlobj=$.ajax({ url:loadpage, async:false, error:function(){ document.getElementById('islem').innerHTML='Something is wrong.'; document.getElementById('islem').innerHTML='Error please try again.'; }, success: function(msg){document.getElementById('islem').innerHTML=loadpage+' Page loaded.';} }); $("#ajaxpage").html(htmlobj.responseText); function CKLoad(id){ CKEDITOR.replace(id); } function SendProccess(id,desc){ document.getElementById('islem').innerHTML='<img src="images/loading.gif" width="16" height="16" align="absmiddle" />'+' Proccessing please wait...' ; htmlobj=$.ajax({ url:id, async:false, error:function(){ document.getElementById('islem').innerHTML='Something is wrong.'; document.getElementById('islem').innerHTML='Error please try again.'; }, success: function(msg){ document.getElementById('islem').innerHTML=desc; } }); $("#ajaxpage").html(htmlobj.responseText); }