2009-11-09 59 views
0

當我是新來的齒輪,我們正在使用的齒輪在我們的web應用程序進行流 是...越來越空了google.gears對象脫機工作

當過用戶的一些任務分配給用戶將得到消息附 與靜態HTML文件,在該HTML我們顯示工作分配給用戶 在HTML表格一旦用戶提交我們正在創建本地數據庫和 保存數據到本地數據庫,但問題是我們不是 得到google.gears對象。 ...

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. 齒輪已經安裝在我的系統中。

  3. 上述代碼在goole chrome中工作,意味着它在Chrome中查找google.gear對象。

任何幫助表示讚賞...

回答

0

對不起,問題是我不包括gears_init.js,但比也有人用谷歌瀏覽器的工作...

包括後gears_init.js文件它工作正常...