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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:54:12+00:00 2026-05-31T04:54:12+00:00

I have a simple html login form, deployed on Xcode using phonegap framework. When

  • 0

I have a simple html login form, deployed on Xcode using phonegap framework.

When the submitLogin button is clicked, I then sent the login credentials using ajax request to verify the login.
This is my javascript function to handle the login:

function submitLoginForm (login_id, login_pass){
    //here we need to communicate with the php files in the server
    console.log ("debug 1 ");
    $.ajax({
        type: "POST",
        url: "http://192.168.1.9/serverapp/loginHandler.php",
        data: "login_id=" + login_id + "&login_password=" + login_pass,
        success: function(loginStatus){
              navigator.notification.alert ("login request successfully sent");
              console.log ("debug 2");
              if (loginStatus == "success"){
                console.log ("debug 3 ");
                location.href = "main.html";
              }
              else{
                console.log ("debug 4 ");
                location.href="index.html?errcode=1";
              }

        }
    });

   console.log ("debug 5 ");
}

After submitting the login form, I could see that the console only printed “debug 1” message. What could be wrong in this case? If the ajax request fails, it is still supposed to print the “debug 5” message, but it did not print anything and just skip the whole thing, except the first debug message.

I could access the php url from my browser, so I am sure that the problem is not with the php code. I have been trying to spend several hours with no result. Do you have any similar problem with Phonegap IOS framework, and how did you fix it?

  • 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-31T04:54:13+00:00Added an answer on May 31, 2026 at 4:54 am

    Problem solved.

    I was using an external jquery file from http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js

    And it appeared that the external jquery url is blocked by the ios simulator, so I have to put that url in the whitelist.

    Steps:

    • In your XCode phonegap project, browse into Resources folder.
    • Go to Supporting Files directory, and edit the PhoneGap.plist file.
    • In the External Host list, add any external URLs that you want to
      access (including the external jquery url, and any other url that you
      would use in your ajax request).

    I hope this will be useful for other developers who encounter the same issue as mine.

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

Sidebar

Related Questions

There are some HTML based games (ie bootleggers.us) that have a simple login form
So for example I have a simple HTML form: <h3> <a href=#>Login</a> </h3> <div
I have a simple html form. On php page. A simple list is placed
I have a simple HTML table which is bound using knockoutJS. However, I've added
I have a simple HTML form. I'd like the right widgets in the second
I have a simple html form that is structured something like this: <form name=test
I would like to have a simple login form (or any form for that
I have a simple form for a login, and I want to display the
I have a simple login form and it does return the success text in
I have used a tutorial here: http://www.phpeasystep.com/phptu/26.html to create a login form for my

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.