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 = event.target; page.querySelector('ons-toolbar .center').innerHTML = page.data.title; }); function goToEventDetailsPage(){ let single_navigator = document.querySelector('#single_navigator'); single_navigator.replacePage('event_detials2.html'); alert("asd"); } $(document).ready(function(){ }); </script> <ons-toolbar> <div class="left"><ons-back-button> 返回</ons-back-button></div> <div class="center"></div> </ons-toolbar> <p onclick="goToEventDetailsPage()">This is the second page.</p> </ons-page>
page2 as above below are screen capture
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