Hello, I'm using "AJAX" for a comment posting section on my website. I'd like for people to be able to click an Add Comment button, then the FCKeditor appears and after they submit their response, it uses "AJAX" to save it in the database and update the page.
My question is, since I'm running PHP on my backend, should I use the PHP installation for FCKeditor or use the Javascript installation since I am using "AJAX" on the client side? Thanks!
Oh also...just curious. How come this forum doesn't use FCKeditor?
Fri, 08/15/2008 - 22:13
#1
Re: Which version to use for PHP and 'AJAX'?
As you only want the editor if the user clicks the 'Comment' button and of course you dont want to reload the page when they do... surely its obvious that you should create the editor instance with JS?
I guess it would be something like this:
You'd have a textarea on the page where you want the editor to appear with display: none.
You have a JS function:
Your button: <button onclick="makeEditor()" value="Comment">
When they click it, the editor appears.
You'd want another button that is also only visible at the same time as the editor that calls your function which submits the content of the editor... something like this:
BTW.. I am no expert.. just started playing about with FCKeditor yesterday.
Re: Which version to use for PHP and 'AJAX'?
HI I have battled with the same problem for weeks now. Finally the solution is there. You need to apply these lines of code to your submit function,
http://blogs.uct.ac.za/blog/lovemores-world/2008/10/27/post-fckeditor-form-with-ajax-solved
Log any more problems on my blog so that I can help you quickly.
Happy coding!