Sunday, April 4, 2010

Link to forward web address

1. I want users to have the option to click a link or button on my website, which will then open the users email and allow the user to forward my web address to someone else without them having to manually copy and paste my web address into their email? How would I do this?

Thanks

Link to forward web address

For Social Bookmarks, try this.

http://AddThis.com

Nancy O.
Alt-Web Design %26amp; Publishing
Web | Graphics | Print | Media?Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.com/blogspot.com

Link to forward web address

There is no reliable way to do this using the visitors email client. The majority of users these days use webmail clients which are typically not configured correctly to have content added via a web link. The best way to do this is via server side scripting. Just search for the web for 'tell a friend script' and you'll find plenty of examples.

I agree with bregent that invoking the user's email client is NOT something you want to do. It's really amazing how many people do not have an email client set up on their own computer.

I'm not familiar with the service nancy suggested.

What you can do is invoke the email client on your webserver using PHP and a simple html form. If you look at my post to the form question ''CSS form help'' you will see code that could easily be modified to serve your purpose. A weakness to this is that the sender could use your system to anonymously send email to someone else--unless you first validate his/her email address.

Hey thanks everyone. I found this script but I need to modify it slightly. I need to:

1. Change the color for the font (when it is published the font is black I need it white) How would I do this?

2. I need to change the published font from a ''Serif'' font to a ''Sans Serif'' font. How would I do this?

3. Currently the text in the text box is left justified. How would I change the type in the text box so it is ''centered''.

Really appreciate it if someone could help me make these changes.

Thanks

%26lt;SCRIPT LANGUAGE=''JavaScript''%26gt;
%26lt;!-- Begin

//Script by Tr姘搉n: http://come.to/tronds
//Submitted to JavaScript Kit (http://javascriptkit.com)
//Visit http://javascriptkit.com for this script

var initialsubj=''Hay buddy, take a look at this''
var initialmsg=''Hi:\n You may want to check out this site: ''+window.location
var good;
function checkEmailAddress(field) {

var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org) |(\.info)|(\.sex)|(\.biz)|(\.aero)|(\.coop)|(\.museum)|(\.name)|(\.pro)|(\..{2,2 }))$)\b/gi);
if (goodEmail) {
good = true;
}
else {
alert('Please enter a valid address.');
field.focus();
field.select();
good = false;
}
}
u = window.location;
function mailThisUrl() {
good = false
checkEmailAddress(document.eMailer.email);
if (good) {

//window.location = ''mailto:''+document.eMailer.email.value+''?subject=''+initialsubj+''%26amp;body=''+documen t.title+'' ''+u;
window.location = ''mailto:''+document.eMailer.email.value+''?subject=''+initialsubj+''%26amp;body=''+initial msg
}
}
//?End --%26gt;
%26lt;/script%26gt;


%26lt;form name=''eMailer''%26gt;
Tell a friend:
%26lt;input type=''text'' name=''email'' size=''26'' value='' Enter Address Here'' onFocus=''this.value='''' onMouseOver=''window.status='Enter email address here and tell a friend about this site...'; return true'' onMouseOut=''window.status='';return true''%26gt;
%26lt;br /%26gt;
%26lt;input type=''button'' value=''Send this URL'' onMouseOver=''window.status='Click to send an email (with this page address) to a friend! Enter email address above...'; return true'' onMouseOut=''window.status='';return true'' onClick=''mailThisUrl();''%26gt;
%26lt;/form%26gt;

No comments:

Post a Comment