Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9184293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:00:42+00:00 2026-06-17T19:00:42+00:00

Although you can change the default error response in JQuery Mobile doing something like:

  • 0

Although you can change the default error response in JQuery Mobile doing something like:

$(document).bind("mobileinit", function() {
    $.mobile.pageLoadErrorMessage = 'This is my custom error.';
});

I would like to use the errors I am returning from the actual application, which allows me to set different messages depending on the error.

For example, with a Forbidden error I would want to display something that correlates to that issue.

I have the flexibility to return the responses as JSON if that would be more palatable for JQuery, I am just not sure how to get the pageLoadErrorMessage to consume that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:00:43+00:00Added an answer on June 17, 2026 at 7:00 pm

    You can use pageloadfailed event for that.

    $(document).on("pageloadfailed", function(event, data){
        event.preventDefault();
    
        var errMessage = data.xhr.status + " " + data.xhr.statusText;
    
        setTimeout(function(){
            $.mobile.loading('hide');
            $.mobile.loading('show', {theme:"e", text:errMessage, textonly:true, textVisible: true});
        },50);
    
        setTimeout(function(){$.mobile.loading('hide')}, 2000);
    
        data.deferred.reject(data.absUrl, data.options);
    });
    

    jsFiddle

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why can't I put the function below inside jQuery(document).ready(function() { } ? function csf_map_maker_js(
I am using the jQuery-File-Upload widget (although I believe this question can generalize to
How can I, given a w3c DOM (Java's default implementation, specifically) change the namespace
How can I change the default value for an inherited dependency property? In our
I've seen from some sources that although you can make an exe or mac
I have a question, although I can't really go into specifics. Will the following
I have the following razor template html, although I can't figure out how to
Although obviously not all scenarios can be covered by a single design, is it
Although a static class has only one instance and can't be instantiated, a class
I know I can’t compile my C# code using the default Platform Target :

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.