Javascript alerts

(Chris) #1

I need to include an alert message in case of “no internet connection” in a simple wdgt that calls a vimeo video to use it in an ibook created by ibook author. Any suggestion?
I tried to create a javascript function “test.js” that works with OS X safari but when I preview in ibook author does not work.

(strmiska) #2

this works for me. (11.3 KB)

(Chris) #3

Many Thanks , I forgot to say that I have the rel. 160 . Is there any way to have the file for this release ?

(strmiska) #4

can´t downgrade the document, but you have to set onLoad first scene:

      var status = hypeDocument.getElementById("status");
         if(navigator.onLine) {
             status.innerHTML = "Online!";
              status.innerHTML = "Offline!";