View Single Post
Old 08-26-2008, 12:36 PM   #1
TimAllmark
 
Join Date: Aug 2008
Posts: 2
Default HELP !! Spry submit with TinyMCE/FCKeditor

Can anyone help me?

The setup is a basic CMS using TinyMCE. I select the page I wish to edit and the correct content is loaded into the editor.

Can anyone tell me why when using the following script to submit the form containing the text editor, (either TinyMCE or FCKeditor) the first time you submit it sends the contents prior to editing, and only by submitting the form again will the updates be saved. The upshot being I have to hit submit on the form twice before the edits are saved

Here is the code for the form:

<form method="post" action="#application.myself##xfa.cms_save#" id="text_editor" name="text_editor" onsubmit="return Spry.Utils.submitForm(this, updateResponseDiv)">
<cfif isDefined('attributes.page')>
<input name="page_loc" type="hidden" value="#attributes.page#" />
</cfif>
<textarea name="content" cols="70" rows="20">
<cfif NOT isDefined('admin_cms_content')>
Please select a page.
<cfelse>
#admin_cms_content#
</cfif>
</textarea>
<br />
<cfif isDefined('attributes.page')>
<input type="submit" value="Save" />
</cfif>
</form>

Any help would be grateful as this has bugged me for a while now.

Cheers

Tim
TimAllmark is offline   Reply With Quote