How to Create a 'Recommend Website' Form?

G

Guest

Please help. I'm trying to create a form that will enable a user to recommend
a website to 3 friends.

The idea is that the form will capture the users name and email address and
up to 3 friends names and email addresses. On clicking the Submit button, the
form would then dispatch an email to the friends referred with a covering
comment.

Any ideas how I can do this? Specifically, the problem I have is that I
don't know how to get FP to email results to an email address(es) as input by
the user.

Thank you,
CJ
 
A

Andrew Murray

Search for such a script on the internet - start with Google.

The two links below were the top 2 results returned by Google when searching
"Recommend this site ASP Script" - minus the quotes

http://www.hotscripts.com/ASP/Scripts_and_Components/Site_Recommendation/index.html

http://www.hotscripts.com/PHP/Scripts_and_Programs/Site_Recommendation/index.html

The above will get you started possibly, the first is an ASP script, the
second is PHP.

There might be others on the site above http://www.hotscripts.com

You'd need to use something like the above, as the FP form handler won't be
the right tool for the task - the form handler in Frontpage is basically so
you can receive feedback from visitors, not send other peoople emails (such
as when recommending your site to others).

It won't work to send emails to other people where their email address
doesn't match the domain hosting the site. i.e. in most cases the host has
set the server/email form feature so it has to be [something]@yourdomain.com
where your web site is www.yourdomain.com, not [something]@hotmail.com or
[something]@tomdickandharry.com being sent from a form on www.yourdomain.com
(if you understand that explanation).
 
G

Guest

Thanks Andrew.

Your recommendations may be a little technical for my limited ability - but
I'll have a go.

Thanks again,
CJ

Andrew Murray said:
Search for such a script on the internet - start with Google.

The two links below were the top 2 results returned by Google when searching
"Recommend this site ASP Script" - minus the quotes

http://www.hotscripts.com/ASP/Scripts_and_Components/Site_Recommendation/index.html

http://www.hotscripts.com/PHP/Scripts_and_Programs/Site_Recommendation/index.html

The above will get you started possibly, the first is an ASP script, the
second is PHP.

There might be others on the site above http://www.hotscripts.com

You'd need to use something like the above, as the FP form handler won't be
the right tool for the task - the form handler in Frontpage is basically so
you can receive feedback from visitors, not send other peoople emails (such
as when recommending your site to others).

It won't work to send emails to other people where their email address
doesn't match the domain hosting the site. i.e. in most cases the host has
set the server/email form feature so it has to be [something]@yourdomain.com
where your web site is www.yourdomain.com, not [something]@hotmail.com or
[something]@tomdickandharry.com being sent from a form on www.yourdomain.com
(if you understand that explanation).



CeeJayUK said:
Please help. I'm trying to create a form that will enable a user to
recommend
a website to 3 friends.

The idea is that the form will capture the users name and email address
and
up to 3 friends names and email addresses. On clicking the Submit button,
the
form would then dispatch an email to the friends referred with a covering
comment.

Any ideas how I can do this? Specifically, the problem I have is that I
don't know how to get FP to email results to an email address(es) as input
by
the user.

Thank you,
CJ
 
T

Trevor L.

CeeJayUK said:
Thanks Andrew.

Your recommendations may be a little technical for my limited ability
- but I'll have a go.

Thanks again,
CJ

This may work
function checkEmailAddress(field)
{
// the following expression in () after 'match' must be all on one line...
if
(field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.info)|(\.biz)|(\.name)|(\..{2,2}))$)\b/gi))
return true
else
{ alert('Please enter a valid e-mail address.')
field.focus()
field.select()
return false }
}
function mailThisUrl()
{
var address = document.eMailer.address.value
var subj = "I thought this might interest you..."
var text = "Here is an interesting Website: "

var content = "mailto:" + address
+ "?subject=" + subj
+ "&body=" + text + "%0d%0a"
+ parent.document.title
+ " (" + parent.location.href + ")"

if (checkEmailAddress(document.eMailer.address))
window.location = content
}
<form name="eMailer" action="">
<a href="#" onmouseover="toolTip('E-Mail this page as link',this)">
Email this site to your friends&nbsp;&nbsp;Enter recipient's e-mail:<br />
<input type="text" id="address" size="30" />
<input type="button" value="Send" style="cursor:pointer"
onclick="mailThisUrl()" />
</a>
</form>

This is (slightly) modified from code on my site, so I know it works for a
single Email address.

All you need is to add a form to collect several addresses, then a script to
loop around, check each one and add them into the var address, separated by
commas.

I guess I could do this in my numerous spare time if you are intersted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top