Firefox and Mailto

When clicking a mailto link in FF (Mac) the browser page redirects to
the php file I use to process the request instead of staying on the
current page. A new message is created so that part works fine.

I’m using:

<?php
header("Location: mailto:email@hidden?");
exit;
?>

This blank page is undesirable. Is my code wrong or is there a way to
fix this behavior? I like using PHP but if I need to I suppose I can
use another method.

Thanks,

Todd


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I don’t think you can do anything about it. Your code is correct, and I’m pretty sure it will work in Safari and other browsers. Firefox is just being weird.

Walter


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Todd,
I had exactly the same issue with my Anti Spam action a while ago. One
of the options is to add the mailto link to a PHP file like this and I
found that both Firefox and IE 7 were stalling on the PHP page and
leaving the user high and dry. What I did in the end was to create a
hidden iFrame on the page (with a visibility:hidden style) and target
the href to the iFrame;

<a href="email.php" target="hidden_iframe">e-mail me</a>
<iframe src="" width="1" height="1" name="hidden_iframe"  
frameborder="0" style="visibility:hidden"></iframe>

Now when the user clicks on the link the PHP page is loaded into the
hidden iFrame and as it’s hidden it doesn’t really matter if the page
remains in the frame or not.
I hope this helps.
Regards,
Tim.

On 6 May 2010, at 21:26, Todd wrote:

When clicking a mailto link in FF (Mac) the browser page redirects
to the php file I use to process the request instead of staying on
the current page. A new message is created so that part works fine.

I’m using:

<?php
header("Location: mailto:email@hidden?");
exit;
?>

This blank page is undesirable. Is my code wrong or is there a way
to fix this behavior? I like using PHP but if I need to I suppose I
can use another method.

Thanks,

Todd

FreewayActions.com - Freeware and commercial actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Nice Tim, I just saved it as a snippet. Thank you.

Todd


offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options