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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:03:14+00:00 2026-05-28T18:03:14+00:00

i have an index.html file that holds: document.addEventListener(deviceready,onDeviceReady,false); function onDeviceReady(){ var deviceuid = device.uuid;

  • 0

i have an index.html file that holds:

document.addEventListener("deviceready",onDeviceReady,false);
function onDeviceReady(){
var deviceuid = device.uuid; // gets the phoneid
alert('index');
checkUser(deviceuid); // this is some function i made
}

from here if everything works OK i will load another page called page1.html that has some text and a link:

<a href="page2.html">Page 2</a>

the page2.html has some other text and a link that goes back to the homepage:

 <a href="index.html">Go to Index</a>

What happens is that when i start the application i can see the alert and the other script running, but when i click on the link to go back to the index.html the page goes blank and no alert is shown

any ideas ? do i have to run some other code that refreshes the page?

edit:

i could use: <a href="#" onClick="document.location = 'index.html';" >Go To Index</a>

but it doesn’t seem to work on the mobile device only in browser

  • 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-28T18:03:15+00:00Added an answer on May 28, 2026 at 6:03 pm

    You are describing standard browser behavior.But jQuery mobile performs page loading default per AJAX, see http://jquerymobile.com/demos/1.0.1/docs/pages/page-links.html.

    This means that the first page (“index.html”) is loaded and onDeviceReady is executed. When you click the link to the second page (“page2.html”) this page is loaded per AJAX, is inserted into the DOM of the first page and is displayed.

    When you click on the link to the first page, no loading occurs because both pages are in the DOM and the first page is displayed again without triggering onDeviceReady – this only happens on the first load.

    You can turn off AJAX loading when you add to every link rel="external".

    However, you should use AJAX loading and its advantages. Read http://jquerymobile.com/demos/1.0.1/docs/pages/page-scripting.html – it explains in detail when a script is executed. I think you should put your code in the pagechange- or pageshow-event, see http://jquerymobile.com/demos/1.0.1/docs/api/events.html.

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

Sidebar

Related Questions

I have an upload script that write a index.html file, I modified it to
Absolute beginner question: I have a template file index.html that looks like this: ...
I have this code in index.html file: $(function(){ $('a#link').live('click', function(e){ $(div#element).load(file.html); }); }); In
I have noticed that on my website index.html file that contaisn php code to
On my index.html file, I have a link to a script: <div id=myList> <div
for html, we have index.html, the file thats automatically loaded by the webserver if
I have a fairly simple app (just one index.html file and a css file
I have deleted public/index.html. Here is my config/routes.rb Those all I have in that
I have an index.html file which I want to run some jQuery when it
I have an index.php-file, which will echo the string with the returned .html-file prepared

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.