jQuery Mobile “Error Loading Page”

Total Post:145


 5499  View(s)
Rate this:
Hi Everyone!

I am using Jquery1.8.2 and Jquery-mobile 1.1

When i click on Logout button i have to goto the Home page. I am able get the home page but before going back to the home page got the "Error Loading Page" message.


  <div data-role="page">
      <div data-role="header" data-theme="b" >
          <h1> Success Page </h1>
           <a data-role="button" id="logoutbtn" data-theme="b">Logout</a>
       </div><!-- /header -->
       <div data-role='content'>            

$("#logoutbtn").click(function () {     
    document.location.href = "Home.html";

Please help me out on this.
  1. Re: jQuery Mobile “Error Loading Page”

    Hi Ezra!

    You should be using the jquery mobile specific methods.

    See document-location-href-location-vs-mobile-changepagelocation

  1. Re: jQuery Mobile “Error Loading Page”


    Instead of

    document.location.href = "/Home.html";

    try as below

    document.location.href = "./Home.html";
    Its working fine and able to go back to home page with out any error.


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.