I have a phone number within a graphic box, how do I get the phone number to display in an iOS device as a hyperlink showing the phone number to call without converting the number into an html file?
Try wrapping it in a tel: url. Select your graphic box so its handles are showing, then open the Hyperlink dialog. In the External tab, enter
tel:1234567890
as the entire URL. (Substitute your actual number.) Test this out in your iPhone. I have not tried this – my iOS simulator just decided it’s not going to work again – but it might be all you need.
Walter
On May 31, 2012, at 7:10 AM, Tony wrote:
Hello all
I have a phone number within a graphic box, how do I get the phone number to display in an iOS device as a hyperlink showing the phone number to call without converting the number into an html file?
Just after I posted that I tried doing that and it worked However, when on viewing this on a Mac (and presumably PC) the browser gives an error message when the link is clicked.
For example:
Safari says ’ … cant open the specified address’ is this a normal response when clicking on a number from a web browser?
Firefox say ‘don’t know how to open this address …’
That sounds correct. I am sure you could hide it from those browsers with JavaScript, or enable it only for browsers that can use it. Are you using any other JavaScript on the same page? Have you enabled any of the FX Actions?
Walter
On May 31, 2012, at 10:09 AM, Tony wrote:
Hi Walter
Just after I posted that I tried doing that and it worked However, when on viewing this on a Mac (and presumably PC) the browser gives an error message when the link is clicked.
Obviously, substitute your real phone number in there.
If you don’t want to load the whole Prototype library to do this one thing, I am sure it could be rewritten to work without it – with the caveat that it might be a whole lot more code for you to write. That’s why I asked if you had any other JavaScript running on the page – in case you were already loading Prototype (so it wouldn’t be any big thing to use it).
Walter
On May 31, 2012, at 11:02 AM, Tony wrote:
JavaScript is running on two pages with PHP feedback forms and Validate. But the error is on all the pages when clicked.
Well, there’s other ways to skin that cat. Let’s say you wanted to get any browser that included the strings ‘MobileSafari’, ‘Blackberry’, ‘Android’ and ‘WebOS’ in their name. Maybe ‘Mobile’ to grab Windows Mobile 7 Phone Edition Plus Walkie-Talkie or whatever they call it today. You could replace:
if(Prototype.Browser.MobileSafari){
with this:
var n = navigator.userAgent;
if($w('mobile blackberry android webos').find(
function(w){ return n.include(w); }
)){
That should get you a test that works on any mobile browser without giving you false truthiness on desktops.
Walter
On May 31, 2012, at 1:54 PM, Tony wrote:
It would need to apply to all mobile devices so maybe that would not be appropriate for me to do