How to open links externally

6 posts, 0 answers
  1. Robin
    Robin avatar
    40 posts
    Member since:
    Jul 2012

    Posted 18 Apr 2013 Link to this post

    Using Kendo UI Mobile v2013.1.319 and PhoneGap 2.6.0 (iOs), I'm no longer able to open links in the Safari browser.

    This worked well on previous versions:
    <a href="http://apache.org" data-rel="external" target="_blank">

    But now it still opens in the same webview as the app itself. 

    Any tips how to force the links to open externally? Preferably without using javascript.  
  2. Petyo
    Admin
    Petyo avatar
    2444 posts

    Posted 22 Apr 2013 Link to this post

    Hi Robin,

    I think that the problem might be related to a specific phonegap behavior. Can you please check this article and see if the suggestions listed in it work for you? 

    Kind regards,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Robin
    Robin avatar
    40 posts
    Member since:
    Jul 2012

    Posted 22 Apr 2013 Link to this post

    It seems the only way to do it is to use javascript and window.open - to either launch the browser or the InAppBrowser (simply adding "target=_blank" doesn't work).

    Perhaps for future releases of Kendo UI Mobile you could make this happen automatically depending on the target attribute of the anchor element. For example if the target is "_blank" or "_iab" it calls the window.open and makes the page load in the InAppBrowser.

    We tried different solutions for overriding the a click event, but found none that worked 100%. 
  4. Petyo
    Admin
    Petyo avatar
    2444 posts

    Posted 24 Apr 2013 Link to this post

    Hello Robin,

    Thank you for your suggestion. I am not sure if we should assume and hard-code the external links behavior on behalf of the application developer, though. From what I see, PhoneGap is also not sure what people expect to happen when a link with target="_blank" is clicked, hence the abundance of discussions (and solutions) available as google results.

    If you discover that Kendo UI Mobile is somehow interfering with the suggested solutions (e.g. a solution works in a regular web page with links in it, but does not work with data-rel="external" links when a Kendo UI Mobile app is instantiated), please let us know. We will do our best to help. 

    All the best,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Brian
    Brian avatar
    23 posts
    Member since:
    Sep 2012

    Posted 16 Jan 2014 Link to this post

    I'm experiencing this issue as well.  The link that you said to look at no longer exists.  Has any concrete solution for this been determined?  
  6. Petyo
    Admin
    Petyo avatar
    2444 posts

    Posted 20 Jan 2014 Link to this post

    Hello Brian,

    This is the article which I linked to originally. 

    Regards,
    Petyo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top