clickable phone numbers and email addresses?

Apologies in advance for this laughably newbish question. I am struggling to find a way to make phone numbers and email addresses clickable in our Enyo app. We currently have this line get called when an email address gets tapped:

window.open('mailto:' + email);

which works fine in Chrome on my laptop and Safari on my ipad, but it doesn't do anything in either browser on my iphone. So I'd like to find a complete solution that works for both emails and phone #'s that works across multiple browsers and devices. I have read about how you can prepend "tel://" to a phone number and "mailto:" to an email to get clickable links in the HTML code but I have no idea how to get down to that level through the enyo / javascript code. All the work I've done for this app so far has been on the Enyo/Backbone level with javascript and I haven't had to tinker with any html stuff, and I'm totally lost. Can anyone point me in the right direction?

Comments

  • edited July 2013
    well I think I was approaching this problem from the wrong angle. it turns out that calling

    window.open('tel://' + phoneNumber);

    works just fine on a laptop/tablet. I call window.close() immediately after that line, and I think that's causing my phone to choke up. Could be an iphone 4 thing, I don't know. I can test my changes as I make them on my local machine, but my code has to get pulled onto github, then to the dev server before I can test stuff on my phone. So, yea, silly question in the first place.
Sign In or Register to comment.