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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:40:23+00:00 2026-05-27T22:40:23+00:00

I am creating an application in phonegap using the jQuery mobile framework. In my

  • 0

I am creating an application in phonegap using the jQuery mobile framework.

In my index.html file I have a two text boxes to accept username and password.

When I click on the submit button it calls a function submitBtn() that checks whether the username and password is correct or not and if it is correct then it should load a new html file that I have created `selectOption.html’

here is my code

<script type="text/javascript">
    $(document).ready(function() {
        var userName;
        var userPassword;

        $("#submitBtn").click(function() {
            //alert("HI");       
            userName = $("#UserName").val();
            userPassword = $("#Password").val();

            if ((!UserName)|| (!userPassword)) {
                alert("Enter the Details");
            }
            else {
                if ((userName !="alpha") ||(userPassword !="beta")) {
                    alert('Enter correct username and password');
                }
                else {
                    //here i want to load my selectOption.html file ?
                }              
            }                                   
        });                           
    });
</script>

my code under <body> is

<body>
    <div data-role="page" id="home">         
        <div data-role="header">             
            <h1>Enter Credential</h1>                       
        </div>

        <div data-role="content">
            <label for="UserName">User Name</label>
            <input type="text" name="UserName" id="UserName" value="" style="width:220px;"  />

            <label for="Password">Password</label>
            <input type="password" name="Password" id="Password" value="" style="width:220px;"  />

            <div id="submitBtn" data-role="button">Submit</div>
        </div>  
    </div>
</body>

The function is getting called but how can I load the selectOption.html file?

  • 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-27T22:40:24+00:00Added an answer on May 27, 2026 at 10:40 pm

    Have you tried using the jQuery Mobile method to perform navigation?

    $.mobile.changePage("newpage.html");
    

    http://jquerymobile.com/demos/1.0/docs/api/methods.html

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

Sidebar

Related Questions

I'm creating a mobile application using jQuery mobile and PhoneGap. When the application is
I am creating an application in which I have two mxml components, MainPanel.mxml and
I am creating application for MAC using cocoa framework, I would like to know
I am currently building a game in phonegap using jQuery Mobile frame work. What
I have a IOS application created through phonegap framework. I have registered a particular
I am creating application in AIR using JavaScript. Many of my functions requires text
I am creating my application using backbone.js As seen below I have a layoutView
i started creating application only using dpr file in delphi 2009 , i think
i creating an application with movie animation , i have a animation some group
I am creating application in facebook using iframe. In that i want to redirect

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.