Hi,
I have been working on a webapp which is using mootools and FCKeditor for content editing. Up till now I was just using a submit button which worked fine but I noticed that FCKEditor had a save button which seems to just submit the form. The problem is I have an event handler attached to the form which is supposed to handle it using AJAX. It works with the submit button but FCKEditor's save button causes problems. I have posted the submit attachment below to see if that may be the problem if anyone happens to know. Otherwise, hoping I can find a solution to this. I can use the submit button but I wouldn't mind shaving that off for the little bit of extra space it provides.
$('EditKeyword').addEvent('submit', function(e) {
var content = (FCKeditorAPI.GetInstance('newKeyContent').GetXHTML()); // retrieve the fck field
$('ContentValue').setProperty('value',content); // this reassigns the value from the fck instance back to the hidden field so you can call data:$('myform') in the ajax
e.stop(); // Stop it from submitting
this.set('send', {
onComplete: function(response) {
nUI.WinOpen(response);
UpdateContent();
// Send the server response to a window.
}
});
this.send();
});
Thank you for your help,
Stewart
I have been working on a webapp which is using mootools and FCKeditor for content editing. Up till now I was just using a submit button which worked fine but I noticed that FCKEditor had a save button which seems to just submit the form. The problem is I have an event handler attached to the form which is supposed to handle it using AJAX. It works with the submit button but FCKEditor's save button causes problems. I have posted the submit attachment below to see if that may be the problem if anyone happens to know. Otherwise, hoping I can find a solution to this. I can use the submit button but I wouldn't mind shaving that off for the little bit of extra space it provides.
$('EditKeyword').addEvent('submit', function(e) {
var content = (FCKeditorAPI.GetInstance('newKeyContent').GetXHTML()); // retrieve the fck field
$('ContentValue').setProperty('value',content); // this reassigns the value from the fck instance back to the hidden field so you can call data:$('myform') in the ajax
e.stop(); // Stop it from submitting
this.set('send', {
onComplete: function(response) {
nUI.WinOpen(response);
UpdateContent();
// Send the server response to a window.
}
});
this.send();
});
Thank you for your help,
Stewart