Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#2880 closed Bug (invalid)

on form submit replace function only working for firefox

Reported by: gongheyong Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.6.4
Keywords: Cc: Björn Brändewall

Description

i think on form submit replace oEditor's content:filter special character(',",(,));i use GetData get oEditor's content after use SetData editor.i find it only working for firefox browser! sample: function postPrevFilter(fString){

if(fString==""){

return;

}else{

fString=fString.replace(/'/g,"’"); fString=fString.replace(/"/g,"”"); fString=fString.replace(/\(/g,"("); fString=fString.replace(/\)/g,")"); return fString;

}

}

function filterEditorContents(EditorName){

var oEditor=FCKeditorAPI.GetInstance(EditorName); oEditorConn=postPrevFilter(oEditor.GetData()); oEditor.SetData(oEditorConn);

}

this form post server side replace fail!content is no filter looking this url:http://www.sdhr114.com/testdemo/3.asp

Attachments (1)

3.asp (3.5 KB) - added by gongheyong 15 years ago.

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by gongheyong

Attachment: 3.asp added

comment:1 Changed 15 years ago by Alfonso Martínez de Lizarrondo

Milestone: FCKeditor 2.6.5

comment:2 Changed 15 years ago by Alfonso Martínez de Lizarrondo

Resolution: invalid
Status: newclosed

SetData is an asynchronous method, and you can't use it that way because then you can't read back the new contents immediately.

comment:3 Changed 15 years ago by Alfonso Martínez de Lizarrondo

Component: Server : ASPGeneral
Keywords: getdate replace setdata removed

comment:4 in reply to:  2 Changed 14 years ago by Björn Brändewall

Cc: Björn Brändewall added

Hi, I have a similar problem.

Replying to alfonsoml:

SetData is an asynchronous method, and you can't use it that way because then you can't read back the new contents immediately.

So what should I do if I want to modify the editor data (more specifically, the data that gets submitted) on form submit? It can't be that uncommon to need to do that.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy