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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:13:21+00:00 2026-06-15T17:13:21+00:00

I am developing an iPhone application using Phonegap & jQuery mobile . The application

  • 0

I am developing an iPhone application using Phonegap & jQuery mobile. The application is using WebSQL for local storage via the Phonegap storage API.

I have been developing and testing in Chrome, and everything is working fine, but when testing in Safari I am getting the following error:

ReferenceError: Can't find variable: loadBookingItems

This happens in my pageinit function:

  $(document).on('pageinit', '#booking_page',  function(){              
     db.transaction(loadBookingItems);
  });

The loadBookingItems function is located in a .js file:

function loadBookingItems(tx){
    tx.executeSql("SELECT * FROM booking", [], loadBookingItemsSuccess, loadBookingItemsFail);
}

The file is getting loaded, and like I said, it is working in Chrome. jQuery is definitely getting loaded.

db is being defined as a global variable:

var db = window.openDatabase("mydb", "1.0", "mydb", 200000);

Any ideas as to what the problem is, and why it is only happening in safari?

  • 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-15T17:13:22+00:00Added an answer on June 15, 2026 at 5:13 pm

    As discussed in the comments, pageshow or pagebeforeshow are more suitable events than pageinitif you want to update the loaded items everytime the page is being shown — and apparently it’s working fine there.

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

Sidebar

Related Questions

I have been developing an iphone application using a domain model, and have put
I am developing an iPhone application using the PhoneGap Framework. Here I have to
I am developing one Iphone application using jquery mobile + HTML5. I can check
I'm in early (pre-coding) stages of developing a mobile web application using jQuery Mobile
Developing iphone application using makkit framework. I have got the map view integrated in
I'm developing an application both for Iphone and Andriod using Phonegap. I came up
I am developing an iPhone application using PhoneGap and jQueryMobile, in my application I
I have been developing iPhone Application. But I have a query regarding it that
I am using MACOS for Developing the iPhone Application. I have made the repository
I'm developing an iphone app using PhoneGap 1.2.0 with Snow Leopard, Xcode 4.2 &

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.