저는 FF3와 Safari에서 잘 작동하는 Gears를 사용하고 있습니다. IE6/7 모두 gears_init.js에 나타나는 페이지로드시 "google is undefined"오류를보고합니다. 빠른 웹 검색 결과 Google에서 제공하는 Javascripts가 실제로 IE7에서 문제를 일으키는 것으로 나타났습니다. 아무도 해결 방법에 대한 아이디어가 있습니까?"google is undefined"
0
A
답변
2
IE6/7에는 기어가 설치되어 있지 않기 때문일 수 있습니다. 즉, Google 관련 코드를 사용할 수 없게됩니다.
if (!window.google) {
alert("please install google gears");
}
else {
// gears is available
}
비록 현실에서 당신은 기어를 다운로드하는 사용자에게 경고를 보여주는보다 약간 더 좋은 무언가를하고 싶어 :
당신은 아마 그런 짓을하고 싶습니다.
0
나는 IE8을 사용하고 난 모질라 파이어 폭스에서 잘 작동하지만
if (!window.google || !google.gears) {
if (confirm("This application requires Gears to be installed. Install now?")) {
location.href = "http://code.google.com/apis/gears/install.html"
return;
} else {
addStatus('Gears is not installed', 'error');
return;
}
}
!window.google
잘하지만 두 번째 조건 !google.gears
작동되는 첫 번째 조건은 작동하지 않았다
html로 이 있습니까? – Nosredna
@Nosredna, 내 답변이 지연되어 죄송합니다. 예, 내 html로 –