Navigation

    Monaca & Onsen UI
    • Register
    • Login
    • Search
    • Tags
    • Users
    • Blog
    • Playground
    1. Home
    2. Broo0d
    B
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    Broo0d

    @Broo0d

    0
    Reputation
    1
    Posts
    1114
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Broo0d Follow

    Posts made by Broo0d

    • Cannot change content with javascript

      I’m using onsen ui version 1, followed https://onsen.io/v1/guide.html to make changes to DOM

      This section to be exact

      // Add another Onsen UI element
          var content = document.getElementById("my-content");
          content.innerHTML="<ons-button>Another Button</ons-button>";
          ons.compile(content);
      

      The problem is nothing changed on the page.

      If i dump “content” variable or dump the HTML element it shows the newly edited version on browser console. but on page still the old one.

      ons object is instantiated.

      posted in Onsen UI
      B
      Broo0d