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

  • SEARCH
  • Home
  • 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 8360337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:26:10+00:00 2026-06-09T11:26:10+00:00

In jQuery Mobile, if user clicks on a button, a loading icon appears and

  • 0

In jQuery Mobile, if user clicks on a button, a loading icon appears and then it loads the new webpage via Ajax.

But, The server may be not respond in my case. Isn’t there any way to put a timeout (e.g. 10 seconds) for ajax navigation feature? (If time limit exceeds, stop trying to navigate and show an error message)

  • 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-09T11:26:13+00:00Added an answer on June 9, 2026 at 11:26 am

    To set a timeout i think you should not do it in a static way ( using “data-transition” )
    you can make a listener to the link (‘onclick’) and within the listener make an ajax call to load your page. Use $.mobile.changePage() to do that.

    The $.mobile.changePage() function is used in a number of places in jQuery Mobile. For example, when a link is clicked, its href attribute is normalized and then $.mobile.changePage() handles the rest.

    so your code could seem like this :

    $('#link_id').click(function() {
        $.ajax({
        url: "page_served_from_server",
            error: function(jqXHR, strError){
            if(strError == 'timeout')
            {
              //do something. Try again perhaps?
            }
        },
        success: function(){
            //charge your page :
           // $.mobile.changePage('yourPageAdress',"turn",false,true);
        },
        // here you can specify your timeout in milliseconds 
        timeout:3000
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Jquery Mobile page into which I'm loading a form via AJAX.
I have a MVC beginform (with JQUERY UI MOBILE AND AJAX.) When the user
I am new to jquery mobile.I am displaying button using <input type=button id=result value=
i'm using jquery mobile to load from remote json the information and then put
I'm using jQuery Mobile and want to turn of Ajax handling because it does
I'm trying to use Jquery Mobile for a web-app, and depending on what button
I am new to phonegap.I am using jquery mobile with html5 for developing android
I use jQuery touchable for mobile use, so the user can hover a star
I use rails and jquery mobile for my site. To create a button styled
I working on a multicolumn layout in Jquery Mobile. When the user opens a

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.