Question

I have a link in the header of my index.htm page that goes to page_02.htm. When the user reaches page_02.htm a variable is set to true. When the user returns to the index.htm from page_02 I wish to check if the variable is in fact true and dynamically update the href and text of the button in the header.

This seems like a very basic task, however I am pulling my hair out trying to figure out how to refresh the index.htm page without having to force page reload. Any ideas?

No correct solution

OTHER TIPS

It looks like you could check to see if a variable is defined in pagebeforeshow and if it is then you can act upon it however you see fit.

$("#homePage").live("pagebeforeshow", function(event) {
    if (typeof some_global != 'undefined') {
        alert(some_global);
    }
});

In my secondary page, all I did was

var some_global = "Made it here";
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top