Page 1 of 1

Is there any way to refresh the current page in JavaScript?

Posted: Fri Nov 22, 2013 12:35 am
by Patrick Kelly

Is there any way that I can refresh the current page of an app? I know that i can refresh the page by calling the page name, but I want to be able to duplicate the page and have the refresh function work without changing going into the code and changing the page name manually. Any way to do this?


Is there any way to refresh the current page in JavaScript?

Posted: Fri Nov 22, 2013 1:37 am
by Alena Prykhodko

Is there any way to refresh the current page in JavaScript?

Posted: Fri Nov 22, 2013 8:19 am
by Patrick Kelly

No, it is a separate issue. It's still caused by duplicating, I just want a way to tell the parent page, whatever its name might happen to be named to refresh.


Is there any way to refresh the current page in JavaScript?

Posted: Fri Nov 22, 2013 9:23 am
by Maryna Brodina

Hello! You can use pre$.mobile.activePage/pre to get current active page. If you need name of current page use pre$.mobile.activePage.attr("dsid")/pre


Is there any way to refresh the current page in JavaScript?

Posted: Sat Nov 23, 2013 2:26 am
by Patrick Kelly

This is exactly what I need! Thanks, though, $.mobile.activePage.refresh(); doesn't seem to do anything... Is there another command that is more appropriate?


Is there any way to refresh the current page in JavaScript?

Posted: Sat Nov 23, 2013 3:48 am
by maxkatz

You can check jQuery Mobile API to see if they provide any other methods.