<head> JS
- Code: Select all
jQuery(function() {
jQuery('.wymeditor').wymeditor();
});
function dosendemail()
{
$return = confirm('Are you sure to send the Email?');
if($return)
{
new Ajax.Updater('Mailmessage','<?php echo $this->base; ?>/applications/sendemail', {asynchronous:true, evalScripts:true, onComplete:function(request) {Element.hide('loading');}, onLoading:function(request) {Element.show('loading');}, parameters:Form.serialize('frmsendemail'), requestHeaders:['X-Update', 'Mailmessage']});
}
}
<body>
- Code: Select all
<form action="#" method="post" name="frmsendemail" id="frmsendemail">
<input type="text" value="Email Subject" />
<textarea class="wymeditor code required"></textarea>
<button type="button" class="wymupdate big left" id="sendemail" onClick="validatesendemail(this.form.name);"><span class="sprite mail-send"></span> Send Email</button>
</form>
Adding a wymupdate class to the send email button doesn't seem to work.