Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Getting Started / November 2007



Tip: Looking for answers? Try searching our database.

Send Page Link

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
InkFasT! - 28 Nov 2007 00:58 GMT
Anyone know of a way to create a dynamic send this page link (mailto:) in CF?
Maybe something like FileExists(this)?? I can create the link of course I just
to make CF generate it's own filename if that makes sense.

Thanks!
David
Daverms - 28 Nov 2007 13:13 GMT
Hi,

Write some UDF function like this once,

<cfscript>
    function fnMailTo(EmailAddress)
   {
    return "<a href=" & "mailto:" & EmailAddress & ">" & EmailAddress & "</a>";
   }
</cfscript>

And Call it like this,

<cfoutput>#fnMailTo('#your_mail_variable#')#</cfoutput>
Azadi - 28 Nov 2007 13:25 GMT
one way i'd do it is pass a getfilefrompath(cgi.script_name) in a url
variable to a page with a 'send link' from where users would enter
their's and recipient's email addresses and then the full link would be
sent via cfmail on form submit.

another way to do it would be with a mailto: link which will open an
email application. you can add thing to the link like
?subject=...&body=... to which you can pass the full url of the page
being sent.

cf makes it easy to have a custom link on each page of your website
which will send that particular page as link.

more info on mailto: link parameters here:
http://www.ianr.unl.edu/internet/mailto.html

---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.