Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #103056
    Joko Pitoyo
    Participant

    <div>
    <div></div>
    <div> const win = document.getElementById(‘windowUser’);</div>
    <div>    win.addEventListener(‘open’, function (event) {</div>
    <div>        // event handling code goes here.</div>
    <div>        win.update(0, “Updated TAB”, “Updated content”);</div>
    <div>    })</div>
    <div>    win.addEventListener(‘closing’, function (event) {</div>
    <div>        // event handling code goes here.</div>
    <div>    })</div>
    </div>
    <div>above script error:</div>
    <div></div>
    <div>Uncaught TypeError: this.update is not a function
    at BaseElement.<anonymous> (app.js?v=1.21:1546:14)
    at f.dispatchEvent (smart.grid.js:1374:27730)
    at fireEvent (smart.grid.js:1374:27132)
    at BaseElement.open (smart.window.js:831:12517)
    at BaseElement.r (smart.grid.js:1374:72203)
    at Object.app.showUserDialog (app.js?v=1.21:1554:17)
    at HTMLAnchorElement.<anonymous> (app.js?v=1.21:1615:13)</div>
    <div></div>
    <div>howto solve?</div>

    #103069
    admin
    Keymaster

    Hi,

    The ‘update’ method is for Tabs Window. I suggest you to do this: When you create a window, add a DIV tag with ID within it. Then with document.querySelector select that div tag and use either appendChild or innerHTML to update its content.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.