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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:05:34+00:00 2026-06-07T07:05:34+00:00

Hi I am developing phonegap application. If I use console.log in index.html file then

  • 0

Hi I am developing phonegap application. If I use console.log in index.html file then it prints, but If I use it in another file it doesn’t print. If suppose I import files in index.html file like:

<!DOCTYPE html>

<html>

<head>  

    <link rel="stylesheet" href="jquery.mobile/jquery.mobile-1.1.0.css" />
    <link rel="stylesheet" href="docs/assets/css/jqm-docs.css" />
    <link rel="stylesheet" href="docsdemos-style-override.css" />


    <script type="text/javascript" charset="utf-8" src="cordova-1.6.1.js"></script>             
    <script type="text/javascript" src="jquery.mobile/jquery-1.7.2.min"></script>       
    <script type="text/javascript" src="jquery.mobile/jqm.autoComplete-1.4.js"></script>    
    <script type="text/javascript" src="jquery.mobile/jquery.mobile-1.1.0.js"></script>

    <script type="text/javascript">

        console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
    </script>

</head>

<body>

<div data-role="page" id="home" data-add-back-btn="true">
    <div data-role="content" >

        <a href="UI/Equity/test.html" data-role="button" id="myButton">index</a>            

    </div>
</div>



</body>
</html>

Then page display with button and print !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!. But on click of button it shows test.html file which is like:

<!DOCTYPE html>

<html>

<head>  

    <link rel="stylesheet" href="jquery.mobile/jquery.mobile-1.1.0.css" />
    <link rel="stylesheet" href="docs/assets/css/jqm-docs.css" />
    <link rel="stylesheet" href="docsdemos-style-override.css" />


    <script type="text/javascript" charset="utf-8" src="cordova-1.6.1.js"></script>             
    <script type="text/javascript" src="jquery.mobile/jquery-1.7.2.min"></script>       
    <script type="text/javascript" src="jquery.mobile/jqm.autoComplete-1.4.js"></script>    
    <script type="text/javascript" src="jquery.mobile/jquery.mobile-1.1.0.js"></script>

    <script type="text/javascript">

        console.log("@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
    </script>

</head>

<body>

<div data-role="page" id="home" data-add-back-btn="true">
    <div data-role="content" >

        <a href="#" data-role="button" id="myButton">Test</a>           

    </div>
</div>



</body>
</html>

But here it doesn’t print @@@@@@@@@@@@@@@@@@@@@@@@@@@@ why is it so?

  • 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-07T07:05:36+00:00Added an answer on June 7, 2026 at 7:05 am

    When you have jQuery mobile “pages” across different HTML files, what
    the framework does is grab the content of the data-role=”page” element
    and it inserts that into the current page’s DOM.

    Anything not in that data-role=”page” element is completely ignored.
    What this means, is only the scripts in the head of the first page you
    hit (in this case index.html) are actually downloaded and
    run, which is why your script needs to be referenced in all the head
    of all pages.

    Check PageCreate event here

    OR

    Another option is to force refresh the page so the script in page 2 is executed, you can do this by setting:

    <div data-role="page" id="home" data-add-back-btn="true">
        <div data-role="content" >
    
            <a href="UI/Equity/test.html" data-ajax="false" data-role="button" id="myButton">index</a>            
    
        </div>
    </div>
    

    Added data-ajax=”false”

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

Sidebar

Related Questions

I am developing an application for Android using phonegap. When I include phonegap.js file
We are developing a Sencha Touch 2 application which makes use of Phonegap to
I am developing a webworks application using phonegap and jquerymobile. I use soapclient.js to
I'm developing a PhoneGap application for Windows Phone 7 and I'm doing some jQuery
I am developing a BlackBerry Phonegap application. Therefore, I am using JavaScript. From a
I am developing an Phonegap & jQuery-Mobile Application for Android. After taking a photo
I am developing an application using jQuery mobile 1.1.0 RC1 and phonegap 1.5.0 I
I am developing a mobile application with Phonegap and I need internationalization - display
What is the performance trade off of using PhoneGap for developing an application that
I am developing a PhoneGap application for Android (will work on iOS too). The

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.