Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
|
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2004, 12:16 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 240
Thanks: 0
Thanked 1 Time in 1 Post
Default How to email an entire page?

I have the coding for emailing the URL link. WHat needs to be changed to send the entire page?

Code:
            </span>
            <form name="eMailer">
              <span class="subheadline_body">
              E-MAIL THIS LINK </span><br>
              Enter recipient's e-mail: <br>
              <input type="text" name="address" size="25">
              <br>
              <input type="button" value="Send this URL" onClick="mailThisUrl();" name="button">
            </form>
<p> 
              <script language="JavaScript1.2">

var good;
function checkEmailAddress(field) {
// the following expression must be all on one line...
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail){
   good = true
} else {
   alert('Please enter a valid e-mail address.')
   field.focus()
   field.select()
   good = false
   }
}

u = window.location;
m = "I thought this might interest you...";
function mailThisUrl(){
   good = false
   checkEmailAddress(document.eMailer.address)
   if (good){
      // the following expression must be all on one line...
      window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u;
   }
}
</script>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Web page email ashuphp Beginning PHP 1 April 19th, 2007 12:03 AM
copy entire row stealthdevil Access VBA 3 December 1st, 2006 11:39 AM
Entire configuration capture bissourav SQL Server 2000 1 August 29th, 2006 05:56 AM
How to backup entire solution? zoltac007 ASP.NET 2.0 Basics 0 June 13th, 2006 01:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.