1
votes

Is there any way to detect when google earth plugin has finished installing so I can refresh the page automatically?

Even if there is no event firing when installed, maybe I can have a javascript interval periodically checking whether it was installed?

1

1 Answers

1
votes

You can use this function to check once every second for plugin support and if installed.

  function googleEarthErrors() {
      if (google.earth.isSupported()) {
          alert('Google Earth Plugin is supported for this browser');
      } else {
          alert('Google Earth Plugin is NOT supported for this browser');
          return false;
      }
      if (google.earth.isInstalled()) {
          alert('Google Earth Plugin is installed');
      } else {
          alert('Google Earth Plugin is NOT installed');
          setTimeout('googleEarthErrors()', 1000);
  }

Obviously you will want to replace the alerts with something more useful and less annoying :)

Also, you should check out this answer - How to check for presence of the google earth plugin using JavaScript?