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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:48:11+00:00 2026-06-07T16:48:11+00:00

My Phonegap application login page contains a few input fields like username, password, url,

  • 0

My Phonegap application login page contains a few input fields like username, password, url, device type, etc… that the user has to enter to activate the application when he logins for the fist time. The next time on the user has to enter only the username and password as the application is already activated. So I want to display only the username and password fields the second time on login.

I have a phonegap plugin to check whether the app is activated or not. I want to call this plugin and based on the callback response I will show only necessary fields on the login page.So what would be the easiest way to do this?

I tried this..

$("#loginPage").live('pagebeforeshow',function(event, ui){
window.plugins.AuthPlugin.appIsActive(appIsActiveCallBack);
});
function appIsActiveCallBack(result){//Show only relative fields...}

But I got this error:Uncaught TypeError: Cannot call method ‘appIsActive’ of undefined

Thanks in advance.

  • 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-07T16:48:14+00:00Added an answer on June 7, 2026 at 4:48 pm

    You are getting Uncaught TypeError because you are trying to call the plugin before even the device is ready… Call the Plugin only when the device is ready…

    UPDATE

    What you have to do is to determine what all fields you need to show in native side only…
    After that pass a variable(flag) from java to JavaScript which will be accessible at pagebeforeshow

    So your Activity will look like something like this

    /*
     * Some database operations which you need to check 
     *  so that you can determine what to show
     */
    this.setIntegerProperty("loadUrlTimeoutValue", 70000);
    super.loadUrl("file:///android_asset/www/index.html", 20000);
    super.loadUrl("javascript: { var pageFlag = '" + flag + "';}");
    

    And in your index.html show like this

    $("#loginPage").live('pagebeforeshow',function(event, ui){
    alert(pageFlag);
    });
    

    After that with the use of flag you can determine what to show and what not to…

    Hope it helps…

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

Sidebar

Related Questions

I am new to PhoneGap development. My PhoneGap application has a login page and
I'm working on a Phonegap application.I have used header for every page. But when
I have developed the android phonegap application using html page and css. But My
I'd like to write a PhoneGap application that keeps a gigabyte of locally cached
I have PhoneGap-Android application and I want to check network connection type (No connection,
I have a phonegap application targeting iPad that needs to embed a video on
I have a phonegap application which will need to take a zip archive of
I am developping a phonegap application with the help of jquery mobile. It has
I'm creating a phonegap application which involves backbone.js, underscore.js, and require.js I want to
I am creating an PhoneGap application for iPhone. When I am designing and testing

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.