since my other topic here (viewtopic.php?f=6&t=10236&start=0&st=0&sk=t&sd=a) was getting a bit messy, and since this is actualy a new problem I start a new one.
I wrote in that other topic already about my new problem (data not getting submitted), but to show in a better way what's actualy happening I extracted the code I have from the site I'm developping into a little script.
I reconstructed my problem at this location:
http://www.ingenuity.be/test/
WHAT TO DO:
-First you click "get the form"
-the form appears, containing some default data ("bla" in the textfield, "blabla" in the editor)
-change both fields values
-click on the button
-a file named process.php dumps the post values from the form
WHAT YOU WILL NOTICE:
-the changes you made to the textfield work fine
-the changes you made in the editor DO NOT WORK,... (value will always be "blabla" for some reason)
Can somebody tell me why? Can somebody help me by telling me where I should search in my code to get this solved? Any suggestions would be much appreciated, thanks in advance.
this is the code:
index.php:
<html> <head> <title>test</title> <script src="dojo/dojo.js" type="text/javascript" djConfig="parseOnLoad: false, isDebug: false"></script> <script src='FCKeditor/fckeditor.js' type='text/javascript'></script> <script src="myJavaScript.js" type='text/javascript'></script> </head> <body> <a href="javascript:get_form()">Get the form</a> <div id='form_goes_here'> form goes here </div> <div id='editor'></div> <div id='post_data_goes_here'> post data goes here </div> </body> </html>
Re: content changes in the editor DO NOT GET SUBMITTED,...
maybe you better close form tag after <div id="editor"></div>, not before?
Re: content changes in the editor DO NOT GET SUBMITTED,...
Also, your setTimeout(1000) isn't very reliable. If it takes DOJO more than a second to initialize, the editor won't find the textarea. It's better to initialize the editor after DOJO is done (on some kind of a completion callback).
Re: content changes in the editor DO NOT GET SUBMITTED,...
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!