CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Opening the users default mail client.

Print topic Send  topic

Author Message
Mac

Posts: 37
Posted: 07/30/2005, 11:34 PM

Hi folks.

I have a button on a page, what that button needs to do is open then users default mail client and load the value of a field into the 'to' box. Pretty much as a hyperlink would.

Any ideas?
_________________
/\/\@<
View profile  Send private message
datadoit.com
Posted: 07/31/2005, 12:31 PM

One method would be to use a template variable (SetTag):

global $Tpl;
$Tpl->SetVar("recipient", $grid->email_field->GetValue());

Then in your HTML your link will be something like:

<a href='mailto://' {recipient} ></a>

-MikeR

peterr


Posts: 5971
Posted: 07/31/2005, 10:55 PM

Also our Employee Directory example contains such links on the "EmpsGrid" page. Those are standard hyperlinks with "mailto:" added into the HTML code.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Mac

Posts: 37
Posted: 07/31/2005, 10:58 PM

Yep that's exactly what I did in the end, set the href value on the control to the database column that contains the mail address and then manually edited the HTML and prefixed the mailto: works like a charm.
_________________
/\/\@<
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.