Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Emailing attachment


Message #1 by "Louise Greally" <lou_greally@h...> on Thu, 26 Sep 2002 02:10:16
Hi

thanks for your response, however I need the actual page to be in the 
format of my web page, form fields and all, either as an attachment or 
pasted into the body itself(if thats not way off)

regards

louise

> 
Louise,
You may get the contents of your page by the
document.body.innerText

so for sending the page by email;
a function can be used like;
<html>
<title>....</title>
..
..

<script>
function sendPageByMail()
  { 
    document.location.href
="mailto:user@u...?subject=" + document.title +
"&body=" + document.body.innerText;
  }

</script>

<form>
<input type=button name="button1" value="Send Page By
Mail" onclick="javascript:sendPageByMail()">
</form>
</html>

Berkay

--- Louise Greally <lou_greally@h...> wrote:
> Hi
> 
> Does anyone know how to activate the File- Send -
> Page By Email function 
> in IE using Javascript.  If not any ideas on how to
> send a current web 
> page as an attachment
> 
> Any help would be most appreciated, thanks.
> 
> Louise
> 
> ---
> 
> Improve your web design skills with these new books
> from Glasshaus.
> 
> Usable Web Menus
>
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> r-20
> ---
> Change your mail options at
> http://p2p.wrox.com/manager.asp or 
> to unsubscribe send a blank email to



__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

  Return to Index