InAppBrowser

3 posts, 0 answers
  1. Thomas
    Thomas avatar
    14 posts
    Member since:
    Jun 2013

    Posted 24 Jun 2013 Link to this post

    Hi , 

    your example code for InAppBrowser is  great  (https://github.com/Icenium/sample-in-app-browser).

    In my application i want to open each link "InApp". So i use " class='share' " on all the links like : 

    <a class="share" href="monlien1">facebook</a> 
    <a class="share" href="monlien2">twitter</a> 
    <a class="share"href="monlien3">google</a>

    and replace  getElementbyId :  share=document.getElementsByClassName("share");

    But it doesn't work. Why ?

  2. Stefan Dobrev
    Admin
    Stefan Dobrev avatar
    790 posts

    Posted 25 Jun 2013 Link to this post

    Hi Thomas,

    I'm not sure why this might not work on your end, but have you modified your code to account that document.getElementsByClassName() returns an Array and not a single DOM element like document.getElementbyId()

    Also you can try to run this in the simulator and see whether there are some JavaScript errors.

    Hope this helps,
    Stefan Dobrev
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Missed our first webinar, watch it here.
    Share feedback and vote for features on our Feedback Portal.
  3. Thomas
    Thomas avatar
    14 posts
    Member since:
    Jun 2013

    Posted 25 Jun 2013 Link to this post

    Thanks
Back to Top