![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
You're not getting me. You can specify the email address, the subject and the body as follows:
<a href="mailto:email@address.com?subject=My Subject&body=The Body.">...</a> |
|
|
|
|
|
#12 |
|
Newbie
Join Date: Sep 2006
Posts: 7
Rep Power: 0
![]() |
Ooble,
Thanks for the reply. I think we're misunderstanding each other. Check out my comment from earlier: " I need a button on a webpage that will do the following steps: 1. Select all the text (ctrl-a) 2. Copy the text to the clipboard or temp space (ctrl-c) 3. Open a new Outlook email 4. Paste the text into the body of the new message " -JTM |
|
|
|
|
|
#13 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
In that case, you can use JavaScript to replace the bits in red on demand. Unfortunately, I haven't played with the DOM in a while, and so can't help you too much (without getting a lot of it wrong, at least), but hopefully someone else will be able to do so. It should be something like this:
<a href="#" onclick="javascript:var subject=escape(document.title);var body=escape(document.body.textContent);window.open('mailto:email@address.com?subject='+subject+'&body='+body);">Mail this page to someone.</a> |
|
|
|
|
|
#14 |
|
Newbie
Join Date: Sep 2006
Posts: 7
Rep Power: 0
![]() |
Here is a working partial solution. Copy the text below into an htm file.
<head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Click to mail content</title> <script language='javascript'> function doMail() { var text=""; if(document.all) { text=document.body.innerText; } else { text=document.body.textContent; } //alert(escape(text).length); window.location="mailTo:?body="+escape(text); } </script> </head> <body> <input type='button' name='btn' value="copy and mail" onclick="doMail();"> <p> <b>Description</b><br> What I'm looking for is a button on a webpage that will do the following:<br> <br> 1. Select all the text of the webpage (similar to ctrl-a)<br> 2. Copy the text to the clipboard or temp space (similar to ctrl-c)<br> 3. Open a new Outlook email<br> 4. Paste the text into the body of the new message (similar to ctrl-v)<br> </p> <p><b><font size="6">This is the version of the script. However this script has a limitation. Due to mailTo: attribute properties of the browsers maximum size of the email is 2kb.</font></b></p> </body> </html> |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|