Hello again. I want to make a form where the user will be able to write the e-mail address, the subject and the body of an e-mail (with a wysiwyg editor) and when the users presses the button "send" a function mailto would take what he will has written and send them to the outllook.... in other words the outlook will open and the email which the user wrote will be the e-mail address, the subject will be the e-mail's subject and the body will be the e-mail's body. I hope you will understand what I want.... I give you the code which I have already written (I have to say that i used the [url="http://ckeditor.com/"]CKeditor[/url]) Thanks in advance!!
- Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Replace Textareas by Class Name - CKEditor Sample</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<script type="text/javascript" src="../ckeditor.js"></script>
<script src="sample.js" type="text/javascript"></script>
<link href="sample.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.size
{
font-size: 16px;
}
</style>
</head>
<body>
<form ...no action...>
<span class="size">E-mail:</span> <input name="email" size='30' value="" /><p>
<span class="size">Subject:</span> <input name="subt" size='30' value="" /><p>
<span class="size">Body:</span> <p> <textarea class="ckeditor" cols="80" id="editor1" name="editor1" rows="10"></textarea>
<!-- This <div> holds alert messages to be display in the sample page. -->
<div id="alerts">
<noscript>
<p>
<strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
support, like yours, you should still see the contents (HTML data) and you should
be able to edit it normally, without a rich editor interface.
</p>
</noscript>
</div>
<p>
<input type='button' value="Send" onClick='sendForm(this.form)'>
</p>
</form>
<SCRIPT language="JavaScript">
function sendForm(formObj)
{
var emailAdd = formObj.email.value;
var subtAdd = formObj.subt.value;
var bodyAdd = formObj.editor1.value;
formObj.action = 'mailto:' + emailAdd + '?subject=' + subtAdd +'&body=' + bodyAdd;
formObj.submit();
}
</script>
<div id="footer">
<hr />
</div>
</body>
</html>