Hi I was trying phone links inside iframe in iOS9. Phone application doesn't open up in safari in iOS9. When i tried same link inside then it is working there.
I was trying below anchor tag. This code opens up phone application when put inside div. But same code doesn't work inside iframe. Please suggest how does it make to work inside iframes as well?
Please use below code to see phone link outside iframe
<a href = "tel://1-408-555-5555">1-408-555-5555</a>
Please use below code to verify phone link inside iframe.
<iframe id = "test" style = "border:none;"></iframe>
<script>
var iframe = document.getElementById("test");
var iDoc = iframe.contentDocument;
iDoc.write('<a href = "tel://1-408-555-5555">1-408-555-5555</a>');
</script>
sandbox attribute for iframes is Fully Supported on Safari 7.1, which means that any user who'd be accessing your page through Safari 7.1 can see it perfectly.
Step 1: Go to Settings icon. Step 2: Select “Safari” Page 4 Confidential 11/16/2017 iPhone and Macbooks Safari SETTINGS to LOAD IFRAMES IN MEMBERS PORTAL 3 Step 3: Ensure that the “Block Pop-ups”, “Prevent Cross-Site Tracking” and “Block all Cookies” are not selected (not green).
Today I had the same problem and found a simple solution for it. Just use target="_parent" and the Links will also work in safari on iOS9.
<iframe id = "test" style = "border:none;"></iframe>
<script>
var iframe = document.getElementById("test");
var iDoc = iframe.contentDocument;
iDoc.write('<a target="_parent" href = "tel://1-408-555-5555">1-408-555-5555</a>');
</script>
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