Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

js not working or navigation not working in in page2

  • Hi Team ,

    first I have page1 , then I have onlick on navi then puspage to page2.
    then in page2 I have wanna to go to page3 on click but its not working , even alert function is not working in the onclick.

    <ons-page id="single">
      <ons-navigator id="single_navigator"></ons-navigator>
      <script type="text/javascript">
        document.addEventListener('init', function(event) {
          var page =;
          page.querySelector('ons-toolbar .center').innerHTML =;
        function goToEventDetailsPage(){
          let single_navigator = document.querySelector('#single_navigator');
        <div class="left"><ons-back-button> 返回</ons-back-button></div>
        <div class="center"></div>
      <p onclick="goToEventDetailsPage()">This is the second page.</p>

    page2 as above below are screen capture

    0_1581053697237_2-7-2020 1-32-54 PM.png

    either alert and replacepage or push page is not working , how can I call this function ?
    because this function is not calling I suspect thanks