I have some parts of the e-book, which includes pages or frames from a web site. However, if the user is not online, than there is than a message instead. I would like to display another contents, if the connection is not available. Does anybody has a Java script for that? or another simple solution?
There is a script/procedure available. It goes like this:
1. You build an online.js file, containing a value indicating something like: ' bookonline = "1"; ' You can also use it to provide other online info, but I won't confuse the issue.
2. Your start page sets 'bookonline' to 'not online', i.e. ' bookonline = "0"; '
3. You follow that declaration with an include to the file, 'online.js'.
4. When your book starts up, 'bookonline' is "0", and it tries to load the remote 'online.js' file. If you're not online, it figures it doesn't exist, no error message is displayed, and 'bookonline' remains "0".
5. Your live page link calls either a local or online page, depending on the value of 'bookonline'.
6. And, just like the 'iscorrectpassword' variable, you can use it to display different images to indicate whether your book is online or not.
And that's it. If you need the specific syntax, I can post the script details this evening if you like, as I don't have access to the files right now.
With any business, it is up to the individual owner of said business to ensure the success of the business. You may make more or less than any sample figures or results that might be quoted on our web sites or other publications. All business involves risk, and many businesses do not succeed. Further, Answers 2000 Limited does NOT represent that any particular individual or business is typical, or that any results or experiences achieved by any particular individual/business is necessarily typical.
Our company's websites' content (including this website's content) includes advertisements for
our own company's websites, products, and services,
and for other organization's websites, products, and services.
In the case of links to other organization's websites,
our company may receive a payment, (1) if you purchase products or services,
or (2) if you sign-up for third party offers, after following links from this website.
Unless specifically otherwise stated, information about other organization's products and services,
is based on information provided by that organization,
the product/service vendor, and/or publicly available information - and should
not be taken to mean that we have used the product/service in question.
Additionally, our company's websites contain some adverts which we are paid
to display, but whose content is not selected by us, such as Google AdSense ads. For more
detailed information, please see Advertising/Endorsements Disclosures
constitutes consent for this. For details, please see Privacy.