We help IT Professionals succeed at work.
Get Started

Modify mailto code

rtod2 asked
Last Modified: 2012-05-12
The mailto code on the page below creates form field that is not needed.  Clicking the "Click to Send Email" link on this current-project page does almost what I want it to do but needs to be modified in the following way.

The body of the email should contain the link to the name of the page as it does but should only show the last part of the URL.  So instead of showing http://www.frugalmule.com/current-project, it would just show the words current-project.

The title of the email should be formatted as whatever the title is.

The link also doesn't appear to become active until you place your cursor in the form field which should not be required.

Assistance is greatly appreciated.
<label>Email Address: </label>
<input type="text" id="send_email" onBlur="document.getElementById('email_link').href = 'mailto:' + this.value + '?subject=Check Out This Link&body=' + document.URL; ">

<a href="javascript:void(0)" id="email_link">Click to Send Email</a>

Open in new window

Watch Question
Top Expert 2011
This problem has been solved!
Unlock 2 Answers and 15 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE