[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

E-mail Form as it looks on screen as attachment

Posted on 1998-12-07
6
Medium Priority
?
215 Views
Last Modified: 2013-12-25
I want to send the document which is previewed in browser by a press of a single button for printer as well as an E-mail to two or three persons as an attachment.
Example: If u are viewing a site and u want the site as it is viewed to be E-mailed to your friend as attachment.How u will do it?Please help me out
0
Comment
Question by:vipin072998
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 1856940
I would try something like the following:
Using javscript:

<script>
function send()
{
   document.print();
   document.formname.submit();
}
</script>

<form name=formname action="mailto:<all the addresses in comma separated list>">
..form elements....
<input type=button value=submit onClick="javascript: send(); return true;">
</form>

try it out.

CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 1856941
oops :)
forgot about the submitting the page part.  I haven't quite figured that out yet...
you could just add the following so they send a link:

replace All of the above (it had a few bugs I didn't test) with the following:

<form method=post name=formname onSubmit="document.formname.action" ENCTYPE="text/html">
<INPUT TYPE="hidden" NAME="URL" VALUE="javascript: document.location;">
<input type="hidden" name="tolist" value="cj.jouhal@lmco.com,cj.jouhal@lmco.com">
<input type="hidden" name="subject" value="test">
<INPUT TYPE="hidden" NAME="mail" VALUE="">
<script>
      document.formname.action='mailto:'+document.formname.tolist.value+'?subject='+document.formname.subject.value;
</script>
<input type=file name=file1 value="">
<script>
      document.formname.action='mailto:'+document.formname.tolist.value+'?subject='+document.formname.subject.value;
      document.formname.file1.value=document.location;
</script>

      <input type=submit value=submit>
      </form>


CJ
0
 
LVL 3

Expert Comment

by:hkp
ID: 1856942
I believe this would require the recipient to have an HTML enabled email program.

Why not deliver a link? You would have to be able to get all the used files on the page, and change the hrefs. Not an easy task.
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
LVL 3

Expert Comment

by:hkp
ID: 1856943
I believe this would require the recipient to have an HTML enabled email program.

Why not deliver a link? You would have to be able to get all the used files on the page, and change the hrefs. Not an easy task.
0
 

Accepted Solution

by:
ajoy092498 earned 80 total points
ID: 1856944
For sending the html page as an attachement by mail, you can use NewMail object of CDONTS component that comes with IIS4.0
0
 

Author Comment

by:vipin072998
ID: 1856945
Dear Ajoy,
Can U send some sample code so that which component u are talking about.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question