I am creating a webpage with a mailto link inside an iframe. I get an error when clicking on this link. The error does not occur when I put the mailto link outside the iframe. It might relate to gmail being my default mail handler, but I want the link to work for gmail users, and of course also for users of other email clients. How can I fix this?
Here's the relevant content from the .html file that goes into the iframe:
<a target="_parent" href="mailto:[email protected]">Contact XXX</a>
And here's the error message.
Load denied by X-Frame-Options: https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/?extsrc%3Dmailto%26url%3Dmailto:[email protected]&scc=1<mpl=default<mplcache=2 does not permit framing.
If it's relevant, I'm testing on Firefox, but of course I'd like a cross-browser solution.
<a target="_blank" href="mailto:[email protected]">Contact XXX</a>
I also had same issue within iframe . you can just add following code onclick event of element for open mailto window
window.top.location='mailto:[email protected]';
this will open your mailto window within iframe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With