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.
this works for me. check_online_offline.hype.zip (11.3 KB)
Many Thanks , I forgot to say that I have the rel. 160 . Is there any way to have the file for this release ?
Chris
can´t downgrade the document, but you have to set onLoad first scene:
var status = hypeDocument.getElementById("status");
if(navigator.onLine) {
status.innerHTML = "Online!";
hypeDocument.startTimelineNamed("online");}
else
{
status.innerHTML = "Offline!";
hypeDocument.startTimelineNamed("offline");
};