Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: SV: Re: Emailing attachment


Message #1 by "Robert Nyman" <robert.nyman@c...> on Thu, 26 Sep 2002 11:30:07 +0200
Doesn't document.body.innerHTML do that trick for you, then...?



/Robert


-----Ursprungligt meddelande-----
Fr=E5n: Louise Greally [mailto:lou_greally@h...]
Skickat: den 26 september 2002 08:11
Till: javascript
=C4mne: [javascript] Re: Emailing attachment


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
=3D"mailto:user@u...?subject=3D" + document.title +
"&body=3D" + document.body.innerText;
  }

</script>

<form>
<input type=3Dbutton name=3D"button1" value=3D"Send Page By
Mail" onclick=3D"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=3Dnosim/theprogramm
e
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
> r-20


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

---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20


  Return to Index