facebook

dynamic links not working in v2.2

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #333400 Reply

    SonamGyato
    Member

    i modify a link at runtime.

    a_elem is an A element in the html file

    a_elem.innerText = “Alternate Payment Options”;

    a_elem.setAttribute( “href”, “http://www.google.com” );

    in v2.2, when i click on the link, nothing happens.

    #333439

    Hi Everest,

    What about this approach:

    Set the onclick action to run javascript code.
    Create a var as you example and change it in runtime, let say phoneui.documentReadyHandler function:

    var url;
    phoneui.documentReadyHandler = function() {
    url ="http://www.google.com";
      }

    And for change the text of your a component:

    $("#m1-link-hyperLink1 a").text("Google")
    

    So, this should work:
    phoneui.documentReadyHandler = function() {
    url =”http://www.genuitec.com”;
    $(“#m1-link-hyperLink1 a”).text(“Google”)
    }

    and your snippet for hyperlink component:

    phoneui.showURL(url);

    Hope this is helpful.

    #333440

    SonamGyato
    Member

    i solved it with

    elem.addEventListener( “click”, function() {}, false );

    case closed.

    thanks.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: dynamic links not working in v2.2

You must be logged in to post in the forum log in