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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:04:38+00:00 2026-05-29T04:04:38+00:00

New question, but really close to need to refresh page in jquery mobile .

  • 0

New question, but really close to need to refresh page in jquery mobile.

I have a /login page, to which user is redirected when accessing the / of the app for the first time (therefore not logged). BTW, to login, user has only to provide a username. This /login page offers a form with a single text input, as follows:

<form method="post">
<span>Votre pseudo:</span>
<input id="username" name="username" data-bind="value: username, valueUpdate: 'afterkeydown'" />
<input type="submit" id="join" data-icon="star" value="Rejoindre !" data-bind="enable : canJoin"/>
</form>

There is no action attribute on the form, therefore (unless I’m missing some fundamentals, hope not) the form submits with post to /login.

I’m using NodeJS with express, and handling the post request server side looks like this:

app.post("/login", function (req, res) {
    //do some stuff, store username for instance...
    res.redirect("/");
});

I am indeed redirected to the / matching page (index), but embedded scripts in this index page are not run, and some jquerymobile objects are not fully operational: this index file has 2 JQM page (two divs with data-role=”page”), and the footer of the first JQM page(div) has 2 links, with one pointing to the second page(div) (via anchors, JQM way). But this link isn’t active either.

I do have to reload the / page in order to have the embeded scripts run ($(document).ready, scripts in header…) and all JQM objects responding correctly.

HINT: before reloading the page, in firebug, the the post /login request’s response has a 302 statut (is it due to the redirect instructions server side), and the following get / request (sure due to the redirect instructions server side) has an EMPTY response with a 200 statut, although it could load the page and the single image it embeds.

I’m surely missing something but can’t figure out…
thanks for all your help

  • 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-29T04:04:39+00:00Added an answer on May 29, 2026 at 4:04 am

    JQuery mobile uses ajax to load the requested page into the dom. The page you are requesting should only have one jqm “page” on it.

    As I remember, I had to add all my scripts to my first page, and then bind to the page change event to decide when to execute them. I don’t think jqm will execute the scripts in the page that was loaded via ajax.

    Take a look at the page structure here:

    http://jquerymobile.com/demos/1.0.1/docs/pages/page-anatomy.html

    More details in how the navigation works is here:

    http://jquerymobile.com/demos/1.0.1/docs/pages/page-navmodel.html

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

Sidebar

Related Questions

This sounds like a really simple question, but I am new to PHP. If
Question ONE: I'm still pretty new to .net, but have used Visual Studio for
I made a similar question a few days ago, but now I have new
can I have a question about how to redirect the page after user invite
I have a new question for WCF gurus. So, I have a class User
Related to my question here but not enough to open a new question. I
This might be a stupid question but I'm new at all this. I want
This may be a silly question, but as someone relatively new to PHP, I'm
I'm sure this is a newbie question, but every time I've compiled/dl'ed a new
I am new to Hibernate world. It may be a silly question, but I

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.