This is an ASP Script simply to be used on your pages to allow users to email an article or page they've seen on your site. This Script also use JavaScript to validate the form.
Tell-a-friend scripts are used to allow surfers to pass on details of the page
they are visiting to
their friends via a neat pop up box. This brings more precious traffic to your site
and makes it look that little bit more professional.
First you will need to create a javascript pop-up function :
We will need to include the above function in the <head> tag of the page.
Then, to create the link itself we need to encode the current page url
and pass it to the tell_a_friend_script page :
<a href="javascript:TellFriend('http://www.codetoad.com/asp/tell_a_friend_script.asp?page=<%
Response.write server.URLEncode("http://www.codetoad.com/asp/tell_a_friend.asp")
%>')"><B>Tell a friend about this page!</B></a>
The page tell_a_friend_script.asp will be the page that appears in the pop up window. To create
the page, the following asp page consists of a form to gather the senders details and message.
The page is submitted itself and displays a thankyou message to the user once the email
has been sent.
Hi yea,
I have mine working but http://www.spudnic.com for the sample , but is there anything I can to to give me the complet address ie http://localhost/swan_server/pics2.asp?imgdate=12/24/02 and not just http://localhost/swan_server/pics2.asp , If you could do anything I would be grateful. regards
I tried the above code, it works but it taqkes ages for the window to pop up, it is not my ISP as far as i am aware as all my other pop up windows work a treat. any ideas.
Well it kinda works but I thought it was going to pass the http_referer , ie the email being sent would contain the full http address along with the query string but sadly this is not the case, this script seems to only send a fixed http address which the web master has to olace in the code first. if any one here knows where I can get a good pop up send to friend code that sends the full address of a page on completion of a form I would be most grateful, I have being on this for the lst two weeks and it is really driving me behind.
This script looks like it will be sweet if it worked right.. I don't know enough about ASP yet to fix it but I am still getting HTML tags in the message box... If I could help I would.. Good Luck Guys.
Otherwise, without this change, the textbox will show a lot of code.
Posted by :
psjunta at 11:45 on Saturday, June 24, 2006
Is it me, or how can you make it call the specific page that it is on? As of now, it only goes to the stated address that you pass from the javascript <a href code.
Thank you for any help!
Paul
To post comments you need to become a member. If you are already a member, please log in .
ASP GetTempName by Jeff Anderson
Use the GetTempName method to create a randomly generated temporary file on the server.
ASP OpenTextFile by Jeff Anderson
An introduction to the OpenTextFile Method of the FileSystemObject
ASP Format Date and Time Script by Jeff Anderson
An ASP script showing the variety of date and time formats possible using the FormatDateTime Function.
Email validation using Regular Expression by Jeff Anderson
Using regular expression syntax is an exellent way to thoroughly validate an email. It's possible in ASP.