If I post html to a mobile browser such as this:
It works as you might expect and Safari asks the user if it should open up the maps program and it drops a pin at the location.
However -- If I use this kind of link in a list view I cannot get it to work.
So to set up this I added some javascript that references fields that I will call inside of a list control.
When I look at his inside the Safari browser as it runs on my phone this is what I get:
List_Link.jpg
(Please note that his example did not return a zip code -- does not matter though as you will see below)
Looks like it should work, but it does not. I can however drag the link displayed into a browser and it delivers.
map.jpg
Yummy for sure. Again:
1. If I place the link inside a panel card then the href works.
2. If I place the link inside a list control it does not work.
List.jpg
Also it pans out if I use the template tester -- the HTML is perfect.
template_Tester.jpg
I hope this is some help for anyone out there that is working to do the same.
Thanks,
Michael Carroll
HTML Code:
<a href="http://maps.apple.com/?q=3950 London Ln, Santa Clara, UT 84765">3950 London Ln, Santa Clara, UT 84765</a>
However -- If I use this kind of link in a list view I cannot get it to work.
So to set up this I added some javascript that references fields that I will call inside of a list control.
Code:
function addressdata(data) { return '<a href="http://maps.apple.com/?q=' + data.address_1 + ',' + data.address_2 + ',' + data.city + ',' + data.state + ',' + data.zip + '">' + data.address_1 + ',' + data.address_2 + ',' + data.city + ',' + data.state + ',' + data.zip + '</a>'; }
HTML Code:
{name} | {sidemarkJob}<br> {@phonedata}<br> {@addressdata}
When I look at his inside the Safari browser as it runs on my phone this is what I get:
List_Link.jpg
(Please note that his example did not return a zip code -- does not matter though as you will see below)
Looks like it should work, but it does not. I can however drag the link displayed into a browser and it delivers.
map.jpg
Yummy for sure. Again:
1. If I place the link inside a panel card then the href works.
2. If I place the link inside a list control it does not work.
List.jpg
Also it pans out if I use the template tester -- the HTML is perfect.
template_Tester.jpg
I hope this is some help for anyone out there that is working to do the same.
Thanks,
Michael Carroll
Comment