File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes How to send the contents of a screen in an email Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to send the contents of a screen in an email" Watch "How to send the contents of a screen in an email" New topic
Author

How to send the contents of a screen in an email

joan frances fisher
Greenhorn

Joined: Sep 12, 2002
Posts: 7
Hello! Is there a javascript wizard out there who can advise me how to capture the contents of a screen and include it as the body of an email to a specified email address?
Thanx much!!
Joan Fisher
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Send the link.....get an email client that allows HTML to be viewed....goto view source on the web poage, copy it paste it into the email....save the page, zip it and send it to the person
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

joan,
your question is a little vague. if you want to send it yourself, you can do any of the things Al said. i would use the print scrn key, change it to a jpeg(using MS paint) then attach it to the email. if you want a program to do it for you, i dont know how.
[ September 13, 2002: Message edited by: Randall Twede ]

SCJP
Visit my download page
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Since you posted this in the "HTML and JavaScript" forum, I'm assuming you aren't wanting to get involved with server-side Java to accomplish this?
(If that assumption is incorrect, check out java.net.URLConnection and the JavaMail API).
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
joan frances fisher
Greenhorn

Joined: Sep 12, 2002
Posts: 7
Hello Its Joan Again...Sorry I was so vague...
What I am trying to accomplish exactly is for the user of my intranet application to be able to click on a button that will invoke the javascript
NewMail object and to somehow (I know not how)
have the body attribute of this email message automatically set to the contents of the current screen (where the button was located). My average user is far from computer/web savvy and wouldn't be willing or able to cut or paste into the body field of the NewMail object...
Hope that is more clear....This may be a pipe dream...but it is worth asking!!
Thanx!
Charlie Sturman
Ranch Hand

Joined: Apr 04, 2002
Posts: 112
function snapShot(){
return document.getElementsByTagName("html")[0].outerHTML;
}
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
i was just thinking the same thing, since I am working with a search script for a page and using innerHTML....I see that someone beat me to it...lol
joan frances fisher
Greenhorn

Joined: Sep 12, 2002
Posts: 7
Brilliant! Thanx a ton!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to send the contents of a screen in an email
 
Similar Threads
JAvascript to sendemail
In case you fail the certification do they send you an email?
how to clear the dos propmt from a java program
Prepared Statement - printing out the statement
reading mail from the server not from inbox