Alpha Video Training
Results 1 to 3 of 3

Thread: List - Click to Call HREF

  1. #1
    Member MichaelCarroll's Avatar
    Real Name
    Michael Carroll
    Join Date
    Feb 2008
    Posts
    467

    Default List - Click to Call HREF

    If I post html to a mobile browser such as this:

    HTML Code:
    <a href="http://maps.apple.com/?q=3950 London Ln, Santa Clara, UT 84765">3950 London Ln, Santa Clara, UT 84765</a>
    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.

    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

  2. #2
    Member MichaelCarroll's Avatar
    Real Name
    Michael Carroll
    Join Date
    Feb 2008
    Posts
    467

    Default Re: List - Click to Call HREF

    Ok -- Sewlyn helped me to know what to do to make this work. Basically this is what the code needs to look like to make it work. He showed me another way, but this was so much more simpler.

    <a href="http://maps.apple.com/?q=3950 London Ln, Santa Clara, UT,84765" onclick="$e.stopPropagation(event);" ontouchstart="$e.stopPropagation(event);">Map It</a>

    Thanks,

    Michael Carroll

  3. #3
    Member
    Real Name
    Dave
    Join Date
    Jul 2012
    Location
    Southern California
    Posts
    621

    Default Re: List - Click to Call HREF

    Thanks for posting Michael.

Similar Threads

  1. Select items in a list from a function call return
    By drex_ej in forum Mobile & Browser Applications
    Replies: 10
    Last Post: 01-09-2014, 09:11 AM
  2. Javascript call to see if a list component is empty
    By Atta in forum Mobile & Browser Applications
    Replies: 10
    Last Post: 12-26-2013, 11:00 PM
  3. Click To Call
    By G Gabriel in forum Alpha Five Version 10 - Desktop Applications
    Replies: 0
    Last Post: 09-02-2011, 09:21 AM
  4. How to call modal form or any form on double click on an active control
    By hjawad in forum Alpha Five Version 9 - Desktop Applications
    Replies: 0
    Last Post: 12-27-2008, 03:20 AM
  5. How can call operations on button click?
    By radhika in forum Application Server Version 8
    Replies: 3
    Last Post: 07-29-2007, 07:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •