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 6477659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:58:33+00:00 2026-05-25T06:58:33+00:00

I must miss a really simple thing here, because it seems so obvious…and I

  • 0

I must miss a really simple thing here, because it seems so obvious…and I can’t believe I can’t find anything on the web for this!

I’m trying to use the jQuery mobile library to make a mobile view of my website.

I have three pages (data-role) in my page. Two with static content and the second with content I wish to load with ajax. The home page have the link to the other two pages:

<div data-role="page" id="home">
    <div data-role="header" id="header">
        <h1>the header</h1>
    </div>
    <div data-role="content">
        <a href="http://absolutepathtomyserver/homepage#highlights" data-role="button">highlights</a>
        <a href="http://absolutepathtomyserver/updatePlaylistTemplate#playlist" data-role="button" rel="external">playlist</a>
    </div>
</div>

<div data-role="page" id="highlights">
    <div data-role="content">
        <p class="center">My static content</p>
    </div>
</div>

<div data-role="page" id="playlist">
    <div data-role="content"><!-- TO BE FILLED FROM AJAX! --></div>
</div>

From my understanding of the many tutorials I read, by default all a href links execute an ajax call unless specified otherwise, but it is not working. When I click on the highlight link, the page is slide like expected without loading any other page since it is the same page. Everything is fine here. But when I click the playlist page, the slide animation is executed but the ajax call is never made so the content of playlist is never filled. Note that I monitor the network calls but none are made when I click on the link.

What did I missed?

Is it my absolute call? I use the tag base url for static content so the links must be absolute throughout all my application.

Do I need to use the .bind method?

Do I need to make the ajax call manually? I can do it, but from I read it seems to be native to href link in the mobile exetension…

  • 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-05-25T06:58:34+00:00Added an answer on May 25, 2026 at 6:58 am

    Option 2 with a bit of tweeking. I don’t know why but as is, the callback function in your code seems too fast because no content is filled, though the content is taken from the back end. I can see the call in my network inspector. Also there was missing ” ‘ “s in the second selector.

    Here is the working code:

    $('#playlist').bind('pageshow', function () {
        $.ajax({
            url: 'updateplaylist.html',
            success:function(data, textStatus, jqXHR){$('#playlist').find('[data-role="content"]').html(data);}
        }); 
    });
    

    I still wonder why the option 1 did not take the right url. I am also afraid that doing my ajax call manually I will skip the default spinner of the jquery mobile framework. Locally it is too fast I don’t see it anyway.

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

Sidebar

Related Questions

I must be doing something wrong here (because really, what are the chances of
Accepting the possibility of extreme ridicule, I must admit that I really miss sun
Sometimes when doing some so very simple, you miss something big. I must be
One thing I really miss on my windows phone 7 is the ability to
This must be a stupid question, but nevertheless I find it curious: Say I
I must be going out of my mind, because my unit tests are failing
The only thing that I miss about using other editors is finding my place
I have technical strings as the following: The thing P1 must connect to the
Must Support IE6 and must Validate vs XHTML Strict 1.0! This is tricky to
Must I call -deleteRowsAtIndexPaths:withRowAnimation: inside an -beginUpdates -endUpdates block?

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.