Hi,
I want to integrate the editor in a form with many other fields. But in Mozilla this don't work at all. A "normal" submit button seems to be disabled. Nothing appears if I click on it. Only the save icon in the editor submits the form.
In IE 6 everything works.
I want to integrate the editor in a form with many other fields. But in Mozilla this don't work at all. A "normal" submit button seems to be disabled. Nothing appears if I click on it. Only the save icon in the editor submits the form.
In IE 6 everything works.
RE: Editor in Form and Submit Button
RE: Editor in Form and Submit Button
If I use the submit button of the form, only the "old" input parameter get's submitted ("test" in the example beneath) and not the newly entered text. If I use the save button of the editor, the new value gets submitted. Find the form code attached:
<form method="post" name="Form0" action="/AppTest/app">
<div><input type="hidden" id="$FCKeditor" name="$FCKeditor" value="test">
<input type="hidden" id="$FCKeditor___Config" value="Toolbar=Default">
<iframe id="$FCKeditor___Frame" src="/AppTest/FCKeditor/editor/fckeditor.html?InstanceName=$FCKeditor" width="100%" height="200" frameborder="no" scrolling="no"></iframe></div>
<input type="submit" value="Submit"/>
</form>
Am I missing something?
Thanks for the good work!
Markus
RE: Editor in Form and Submit Button
As a side note, this only happens to me with old gecko engines (firefox 0.8). With newer (firefox 0.9) it submits, but the content of the editor is lost.
Also, if the XHTML mode for the editor is disabled there is no problem and submits well.
RE: Editor in Form and Submit Button
I have the newest mozilla and using a normal submit button doesn't give an error but also doesn't save the editors changes. Changes of other fields get saved. Save button of the editor saves both the changes in the editor as well as all other fields.
RE: Editor in Form and Submit Button
I was thinking I could use a regular button and onclick have javascript call the editor's save method, if I could find what it's called!
Until then I'll just instruct my users to use the editors save button instead, and hide the form's submit button.
RE: Editor in Form and Submit Button
I created a hidden field where I put the value of the editor with this script executed on onSubmit() of the form:
function updateHtml() {
htmlValue = FCKeditorAPI.__Instances.html.GetHTML();
document.getElementById("HtmlValue").value = htmlValue;
}
Hope this help!
RE: Editor in Form and Submit Button
function updateHtml() {
htmlValue = FCKeditorAPI.__Instances.html.GetHTML();
document.getElementById("HtmlValue").value = htmlValue;
}
...__Instances.html...
"html" is the id og the editor (used in constructor)
...getElementById("HtmlValue")...
"HtmlValue" if the name of the hidden field.
Good luck!
RE: Editor in Form and Submit Button
RE: Editor in Form and Submit Button
fixed the Submit button/update problem for me, along a with a number of other bugs... (However, the actual Save button still does nothing -- any ideas?)
RE: Editor in Form and Submit Button
Thanks,
Michael
RE: Editor in Form and Submit Button