Using jQuery Mobile with ASP.NET generating Javascript on server

If you are using jQuery Mobile which does downloads the next page via AJAX instead of via the browser, note that the Javascript still runs within the scope of the first page you loaded. So, use different variable names for the JS for different pages, and also the script which gets generated into the web page needs to go into the jQuery Mobile header, footer or content - otherwise it will not get loaded when the AJAX call retrieves the next page.

I really like jQuery Mobile a lot because it takes away the pain of building mobile UIs in HTML5

[Update] I have been trying to debug a very difficult issue for the past few days and yesterday night I finally figured out - the reason why my AJAX call was not updating the content list on a different page than what I initially loaded is because each page needs to have content lists with different ids. If the ids are the same, then the code to clear and add items to the content list do not go to the correct content list.

Comments

Popular posts from this blog

Tutorial: Using Google Cloud Storage from C# and .NET

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?

Enable Visual Studio to use more than 2GB of memory