I am using CKEditor for JQuery, and the value is not being passed to the form onsubmit.
My form:
My function to submit:
..and the CKEditor function:
Any help is greatly appreciated.
My form:
<form id="venueForm" action="include/transport.php?form=venueForm" method="post" name="venueForm"> <table width="100%"><tr> <td width="50%"> <div align="center"> Description 1<br /> <textarea name="vDesc1" tabindex=25 class="vDesc1_ckeditor" id="vDesc1" rows="4" cols="80"><?php echo $vMore; ?></textarea></div> </td> <td width="50%"> <div align="center"> Description 2<br /> <textarea name="vDesc2" tabindex=26 class="vDesc2_ckeditor" id="vDesc2" rows="4" cols="80"><?php echo $vMore2; ?></textarea></div> </td> </tr></table> </form>
My function to submit:
// FUNCTION TO SUBMIT
function submitVenueForm() {
// TO PASS THE CKEDITOR INSTANCES......
CKEDITOR.instances.vDesc1.updateElement();
CKEDITOR.instances.vDesc2.updateElement();
/* THIS DID NOT WORK either
for ( instance in CKEDITOR.instances )
CKEDITOR.instances[instance].updateElement();
*/
document.venueForm.submit();
}
..and the CKEditor function:
$(function() {
if (CKEDITOR.instances.vDesc1) CKEDITOR.instances.vDesc1.destroy();
if (CKEDITOR.instances.vDesc2) CKEDITOR.instances.vDesc2.destroy();
var config = {
toolbar:
[
['Bold', 'Italic', 'Underline', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink', '-', 'Outdent','Indent', '-', 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['UIColor']
]
};
$('.vDesc1_ckeditor').ckeditor(config);
$('.vDesc2_ckeditor').ckeditor(config);
});
Any help is greatly appreciated.
