views:

76

answers:

1

Hi,

I am new to gear, We are using gear in our web application were flow is ...

When ever user assign with some task user will get message attached with static html file, In that html we are showing work assign to user in html form once user submit we are creating local database and saving data to local database, But the problem is we are not getting google.gears Object ...

function init() {
 var success = false;
 if (window.google && google.gears) {
 try {
    db = google.gears.factory.create('beta.database');
    if (db) {
       db.open('local');
       db.execute('create table if not exists user (name varchar
(100), user_req_desc varchar(100), status varchar(100), timestamp
int)');
   } catch (ex) {
      setError('Could not create database: ' + ex.message);
   }
 }
 if (!window.google || !google.gears) {
  if(confirm("Gears is not installed. Do you want to install Gears
now ?")) {
         location.href = "http://gears.google.com/?action=install";
    }
 }
  1. google.gears object is coming null

  2. gear is already installed in my system.

  3. The above code is working in goole chrome, mean it's finding the google.gear object in chrome.

Any Help Appreciated ...

A: 

I am sorry the problem was I am not including gears_init.js, but than also it was working with google chrome ...

After including the gears_init.js file it's working fine ...

Bihag Raval