B2theRandino / iui

Automatically exported from code.google.com/p/iui
MIT License
0 stars 0 forks source link

tel:XXXXXXXX does not work anymore #109

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

What version of the product are you using? On what operating system?
V0.13. iPhone version 2.1 (5F136)

Please provide any additional information below.

Site is 3 levels deep. After first page xml is read in background and layout 
rendered through php. 
User makes next selection and another xml is read in background and layout is 
rendered through 
php. On that page a tel:XXXXXX link is called by :

<li onclick="window.location.href = 'tel:$phone'" >$phone</li>

If I call the page directly the tel: link works. 

Same applies to mailto: link.

Normal links (A href) do work.

THanks for this software, it's really easy to create something quickly now.

Original issue reported on code.google.com by marco.la...@gmail.com on 26 Sep 2008 at 3:52

GoogleCodeExporter commented 8 years ago
Your php code should probably be:

<li><a href="tel:$phone">$phone</a></li>

because the hinting (i.e., an underlined link) is the user's only visual clue 
that
the phone number is clickable.

Original comment by anthon.p...@gmail.com on 6 Jan 2009 at 5:07

GoogleCodeExporter commented 8 years ago
Fix is to add this code to the addEventListener() function.  I added it after 
the the if(link.href && link.hash && 
link.hash != #) block:

else if (link.href.substring(0,4) == "tel:"){
            // do nothing.
            return;
        }

If you want mailto: links to work like normal instead of iui trying to post 
them via ajax then change it to:

else if (link.href.substring(0,4) == "tel:" || link.href.substring(0,7) == 
"mailto:"){
            // do nothing.
            return;
        }

Original comment by phipps...@gmail.com on 19 Feb 2010 at 5:54