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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:30:37+00:00 2026-05-26T11:30:37+00:00

I have a javascript/jquery function in an offline-capable web app that works great in

  • 0

I have a javascript/jquery function in an offline-capable web app that works great in Chrome 11, but since Chrome 12 has ceased to work. Don’t care about other browsers, but getting this working in more recent versions of Chrome is getting more and more critical.

In a nutshell, I call a PHP data page (not cross-domain) and get back a JSON array, which gets iterated over, inserting elements of the response into the local SQLite db.

The console log raises no flags, and no javascript errors. I see the JSON in the response, and the only part that seems to break is the data insert found in the try block.

Anyone know if there was a change in Chrome after version 11 that would prevent interaction with the SQLite db? Any help would be most appreciated.

function importAssignmentData() 
{
var import_count = 0;
$.get("data.php", function(data) {
    if (data instanceof Array){
        // Data is properly formed as an array.
    }
    else{
        alert('Data from the server was not properly formed. You may not be logged in.');
    }
    $.each(data, function(index, value) { 
        if (this.order_id == 'authfail'){
            alert("You are not logged into the server. Authentication failure.");
            console.log("Authentication failure.");
        }
        else{
            if (typeof this.order_id != 'undefined') { // sanity check    
                import_count++;
                var EMPTY               = "";
                var order_id            = (this.order_id == '') ? EMPTY : this.order_id;
                var order_code          = (this.order_code == '') ? EMPTY : this.order_code;
                var customer_id         = (this.customer_id == '') ? EMPTY : this.customer_id;
                var customer_name_first = (this.customer_name_first == '') ? EMPTY : this.customer_name_first;
                var customer_name_last  = (this.customer_name_last == '') ? EMPTY : this.customer_name_last;
                var customer_phone      = (this.customer_phone == '') ? EMPTY : this.customer_phone;
                var customer_email      = (this.customer_email == '') ? EMPTY : this.customer_email;
                var customer_address    = (this.customer_address == '') ? EMPTY : this.customer_address;
                var customer_city       = (this.customer_city == '') ? EMPTY : this.customer_city;
                var customer_state      = (this.customer_state == '') ? EMPTY : this.customer_state;
                var customer_zip        = (this.customer_zip == '') ? EMPTY : this.customer_zip;
                var order_notes_contractor = (this.order_notes_contractor == '') ? EMPTY : this.order_notes_contractor;
                var measurement_date    = (this.measurement_date == '') ? EMPTY : this.measurement_date;
                try {
                    ODATA.transaction(function (transaction, results){transaction.executeSql("INSERT INTO order_specs (order_id, order_code, customer_id, customer_name_first, customer_name_last, customer_phone, customer_email, customer_address, customer_city, customer_state, customer_zip, order_notes_contractor, measurement_date) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", [order_id, order_code, customer_id, customer_name_first, customer_name_last, customer_phone, customer_email, customer_address, customer_city, customer_state, customer_zip, order_notes_contractor, measurement_date], nullDataHandler, errorHandler);});
                    console.log("Order record inserted.");
                }
                catch(e) {
                    console.log(e.message);
                }                           

            }
            else {
                alert('You are not online, or you may not be logged in properly.');
                console.log("Offline attempt to retrieve remote data. No inserts made.");
            } // end sanity check
        } // end authfail check
    }); // end .each
    var plural = (import_count == 1) ? "" : "s" ;
    alert('You have ' + import_count + ' active assignment' + plural + '.\nClick List Assignments to view your assignments.');
    $('#reload_page').focus();
});
}
  • 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-26T11:30:38+00:00Added an answer on May 26, 2026 at 11:30 am

    This turned out to be some incompatibility with jQuery 1.5.2. Not sure of the internals or specifics involved, but at this point I do not even care.

    Upgrading to jQuery 1.6.4 library solved the problem.

    I will now go comb what little hair I have left – hopefully this will help others out there keep more of theirs.

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

Sidebar

Related Questions

I have a simple JavaScript file that has three jQuery $document.ready functions. All three
I have two JavaScript files that contain a jQuery function with the same name
Strange question, I know. Allow me to explain. I have a JavaScript/jQuery function that
I want to make a javascript (or jquery) function that works onChange and allow
I'm looking for a way to have a javascript/jquery function that references dynamically created
I have an MVC 3 web app that has an Action which I need
I have a javascript/jQuery block as a callback after $.get function: function myCallBack(data, textStatus)
I have problems with the following bit of javascript/jquery code: this.droppable = function(){ $('.imageWindow
I have the following jquery function > <script type=text/javascript> > > $(document).ready(function() { >
I have this simple function: <script type=text/javascript> //<![CDATA[ jQuery(function($){ function here(b){alert(b);} ; here(6); });

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.