Patrick Kelly
Posts: 0
Joined: Wed Nov 20, 2013 6:00 am

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

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?

Patrick Kelly
Posts: 0
Joined: Wed Nov 20, 2013 6:00 am

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

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.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

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

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

Patrick Kelly
Posts: 0
Joined: Wed Nov 20, 2013 6:00 am

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

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?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

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

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

Return to “Issues”