Monaca Onsen UI Discord Chat Github Repo

Simple popPage() question...

  • Hello,

    I have page A, Page B and Page C.

    On click of button in Page A, I pushPage B.
    On click of button in Page B, I pushPage C.

    Page C has a entry form with a ons-button. On click of the button, I post to rest api to save the data into the DB and calling popPage() which works fine.

    Now, I want to change color of the button in Page B so that the user knows there is a data.

    I use JQuery. How I access that button on page B to change the color, please?

    Thanks for your help!

  • Could you respond please?

  • After popping page C, refreshing the Page B is also fine.


  • @mmike Please remember the Onsen team is in Japan and a lot of the community members are all around the world in different time zones. On to your question, after the popPage call, just reference the button by ID and change the style.

  • Thanks munsterlander!

    That’s is exactly what I am doing it does not work.


    Once again thanks!

  • @mmike,

    It has nothing to do with Onsen popPage()!

    Incorrect jQuery CSS method syntax:


    Correct syntax:

    $("#btn").css("color", "black");


    $("#btn").css({"color" : "black"});


  • @jemel

    Thanks Jamel!

    That worked. Apart from changing the color of the button, I need to refresh this page so that I can display the entered from DB.

    Question: After popPage(), Is it possible to refresh this page?

    Thanks for your help!