Please help.....
I want to change the content entered by user using Javascript. I needed to do this since the text starting with any HTML tag is resulting in call to undesired struts Action.
To avoid that I want to use a workaround where the content entered by user is preceded by "ZZZZZ" which will later be removed before entering in the database.
I am using following code.....
var temp ="ZZZZZ"+FCK.GetXHTML();
document.getElementById("message").value = temp;
FCK.Focus();
FCK.SetHTML( temp, true ) ;
This is working fine, but there is a problem. If I click on "Source" in FCKEditor, enter some text and then try to change the content now with the above code. It doesn't work. And hence my workaround is not entirely helpful.
Is there any way where I can change the value using Javascript even though user has selected source in the toolbar?
I also tried using FCK.ToolbarSet = "Default"; before changing the text. But the text does not change if the user has selected "source"
Thanks,
Sameer
I want to change the content entered by user using Javascript. I needed to do this since the text starting with any HTML tag is resulting in call to undesired struts Action.
To avoid that I want to use a workaround where the content entered by user is preceded by "ZZZZZ" which will later be removed before entering in the database.
I am using following code.....
var temp ="ZZZZZ"+FCK.GetXHTML();
document.getElementById("message").value = temp;
FCK.Focus();
FCK.SetHTML( temp, true ) ;
This is working fine, but there is a problem. If I click on "Source" in FCKEditor, enter some text and then try to change the content now with the above code. It doesn't work. And hence my workaround is not entirely helpful.
Is there any way where I can change the value using Javascript even though user has selected source in the toolbar?
I also tried using FCK.ToolbarSet = "Default"; before changing the text. But the text does not change if the user has selected "source"
Thanks,
Sameer