Conditional statements in HTML to rule out non-mobile devices -


well i've made responsive website handles in mobile devices. there phonenumbers on website cliënt clickable on phone visitor can call directly. found making link of phonenumbers works so:

<a href="tel:003164646464">make call</a>  

this triggers mobilephones call number. triggers webbrowser on other device follow link, results in "page can't found" i'm looking anwser tackle problem. i've been searching while i'm getting bit tired , frustrated. think i've come solution don't excactly know how put in html. there several ways conditional comment browsers in html. if link part , rule out:

<!--[if **none mobile** webrowsers: don't read:]><a href="tel:003164646464">003164646464</a> 

and mobile browsers read link. seems me, easy way this, wrong... hope can give me pointers, appreciate idea's , help!

thanks!

there no easy way achieve this. can use different approaches depending how accurate want be:

  1. wurfl - accurate, allows check user-agent , browser / device capabilities
  2. you can try parsing user-agent own detecting os - check answer detecting mobile browser
  3. use css media queries target devices small screen

unfortunately there no silver bullet (at least don't know one).


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -