rtod2
asked on
Make link clickable without entry
This page http://www.frugalmule.com/current-project/ contains the code that follows. Currently, you have to at least put the cursor into the field shown in order to make get the "Click to Send Email" link actually work. How do I avoid that?
<input type="text" id="send_email" onBlur="document.getElementById('email_link').href = 'mailto:' + this.value + '?subject=Title of Post&body=' + document.URL; ">
<a href="javascript:void(0)" id="email_link">Click to Send Email</a>
ASKER
Sammy, Thank you!
That's a better approach I think but only if it would behave the same way I am after with the javascript.
Can you make your solution perform the following tasks:
1. place a link to the page into the body of the email
2. title the page by the title of the post.
That's a better approach I think but only if it would behave the same way I am after with the javascript.
Can you make your solution perform the following tasks:
1. place a link to the page into the body of the email
2. title the page by the title of the post.
This may help too:
taken from
https://www.experts-exchange.com/questions/27431771/Modify-mailto-code.html
<html>
<head>
<script>
function updateEmailLink(){
var thisPage = window.location.pathname;
document.getElementById('email_link').href = 'mailto:' + this.value + '?subject=Check Out This Link&body=' + thisPage;
}
</script>
</head>
<body>
<label>Email Address: </label>
<input type="text" id="send_email" onBlur="javascript:updateEmailLink();">
<a href="javascript:void(0)" id="email_link">Click to Send Email</a>
<script>
updateEmailLink();
</script>
</body>
</html>
taken from
https://www.experts-exchange.com/questions/27431771/Modify-mailto-code.html
Now, that I took another look at that link, that was you too!
Didn't that solution work for you?
Didn't that solution work for you?
ASKER
No, that solution does not put a link into the body of the email.
Tell me, what is the body of email?
ASKER
Purpose:
Click link which will bring up the new mail message box your default email program.
The Title and Body of the email get automatically populated with the Title of the page, and the link back to the page.
To answer your question more directly, the body of the email should contain a link back to the page that contains the original link.
Click link which will bring up the new mail message box your default email program.
The Title and Body of the email get automatically populated with the Title of the page, and the link back to the page.
To answer your question more directly, the body of the email should contain a link back to the page that contains the original link.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Sammy,
Thanks for trying to help. Your last solution produces this http://screencast.com/t/RM2aLospK .
What I am trying to produce would look like this http://screencast.com/t/MDAe8McT.
Notice that there is room to start entering text about the page you are forwarding a link to and the title takes on the title of the page you are discussion. The email address is blank to allow for whatever the person wants to put in from their own address book.
Thanks for trying to help. Your last solution produces this http://screencast.com/t/RM2aLospK .
What I am trying to produce would look like this http://screencast.com/t/MDAe8McT.
Notice that there is room to start entering text about the page you are forwarding a link to and the title takes on the title of the page you are discussion. The email address is blank to allow for whatever the person wants to put in from their own address book.
ASKER
Not quite, Sammy. I'll try to further break this down into its components
<tr>
<td width="407"><font face="Verdana, Arial, Helvetica" color="#FFCC00"><font face="Arial"><a href="mailto:youremail?sub
to send Email</a></font></h3>
</td>
</tr>
Unless of course there is a reason to use javascript.