How to Automatically Redirect Users Between Flash

advertisement
Author: GeoWise User Support
Released: 05/07/2013
Version: 6.7.0
How to Automatically Redirect Users Between
TM
Flash and HTML InstantAtlas Dynamic
Reports for Incompatible Browsers
visualise | communicate | ENGAGE
How to Automatically Redirect Users Between Flash and HTML InstantAtlasTM Dynamic Reports for Incompatible Browsers
g the InstantAtlas Area Profile Template User Guide
Table of Contents
1.
Introduction ...................................................................................................................................... 1
2.
Automatic Redirect from an HTML to a Flash Report ...................................................................... 1
3.
4.
© GeoWise Ltd. 2013
2.1.
Browser Compatibility .............................................................................................................. 1
2.2.
The Script in the atlas.html File ............................................................................................... 1
Automatic Redirect for Tablet Users from a Flash to an HTML Report ........................................... 2
3.1.
Flash Player and Tablet Devices ............................................................................................. 2
3.2.
The Script in the atlas.html File ............................................................................................... 2
InstantAtlas Support......................................................................................................................... 3
visualise | communicate | ENGAGE
How to Automatically Redirect Users Between Flash and HTML InstantAtlasTM Dynamic Reports for Incompatible Browsers
1. Introduction
g the InstantAtlas Area Profile Template User Guide
Please note that you will need to have created the equivalent Flash
dynamic report in order for the following method to work.
This guide explains the issues surrounding our Flash and HTML Edition
templates in relation to browser compatibility, how to automatically redirect
2.2. The Script in the atlas.html File
users from an HTML dynamic report viewed in an incompatible browser to
an equivalent Flash dynamic report, and also how to automatically redirect
An uneditted atlas.html file for an HTML dynamic report will look similar to
tablet users from a Flash dynamic report to an equivalent HTML dynamic
Figure 1 (scrolled down to the bottom of the code).
report.
Figure 1
2. Automatic Redirect from an HTML to a Flash
Report
2.1. Browser Compatibility
Our HTML templates are available to view in most modern browsers such
as Internet Explorer 9, Firefox, Chrome and Safari. If you are using an
older Internet browser such as Internet Explorer 6, 7 or 8, HTML5
technology is not supported and therefore it will not be possible to view our
HTML dynamic reports. It will be possible to view our Flash dynamic
reports if the Adobe Flash Player is installed.
As a result our HTML templates include a script which, when viewed in an
incompatible browser, will automatically trigger an alternative page to
display. The default alternative page that it redirects to is called ‘atlasunsupported.html’ and is found in the report folder of an HTML dynamic
The code required to redirect a user who has an incompatible browser can
be seen highlighted in the red box in Figure 1.
report. You can modify this page to display whatever you wish.
© GeoWise Ltd. 2013
Alternatively you can modify the script to change the link to the page it is
You can see that, when the atlas.html file is opened in an incompatible
redirected to and therefore for instance could be redirected to an
browser, it automatically redirects to the atlas-unsupported.html page
equivalent Flash dynamic report.
located in the report folder as shown in the following line from the script:
Page 1
visualise | communicate | ENGAGE
if
(typeof
jQuery
==
How to Automatically Redirect Users Between Flash and HTML InstantAtlasTM Dynamic Reports for Incompatible Browsers
'undefined')
window.location
=
g the InstantAtlas Area Profile Template User Guide
"./atlas-unsupported.html";
3. Automatic Redirect for Tablet Users from a
Flash to an HTML Report
and further down again:
3.1. Flash Player and Tablet Devices
else window.location = "./atlas-unsupported.html";
Tablet users are likely to not be able to view Flash reports on their devices
In order to link to a Flash report located in a separate subfolder within your
HTML report folder, then you would change these links in both lines, for
instance:
if
(typeof
as Adobe has announced in November 2011 that they “will no longer
continue to develop Flash Player to work in the browser with new mobile
device configurations”. However tablet users will be able to view HTML
jQuery
==
'undefined')
window.location
=
"./flashreport/atlas.html";
reports, which are by default also better suitable for touch navigation. It is
possible to automatically redirect a tablet user to an equivalent HTML
report when they try to open a Flash report.
and further down again:
else window.location = "./flashreport/atlas.html";
where ‘flashreport’ is the folder containing the Flash report files and is
located within the HTML report folder. You can amend this link if your Flash
Please note that you will need to have created the equivalent HTML
dynamic report in order for the following method to work.
3.2. The Script in the atlas.html File
report is stored in a different location.
The code for this automatic redirect is as follows:
If you wished to redirect to a webpage then this would also be possible by
if ('ontouchstart' in window) window.location =
using the absolute link of the webpage, for instance:
"./HTMLreport/atlas.html";
window.location = "
http://www.website.com/flashreport/atlas.html";
It needs to be pasted into the atlas.html file of you Flash report after the
first occurrence of <script type="text/javascript">.
In the script above ‘HTMLreport’ is the folder containing the HTML report
files which is located in the Flash report folder. You can amend this link if
your HTML report is stored in a different location.
© GeoWise Ltd. 2013
Page 2
visualise | communicate | ENGAGE
How to Automatically Redirect Users Between Flash and HTML InstantAtlasTM Dynamic Reports for Incompatible Browsers
4. InstantAtlas Support
g the InstantAtlas Area Profile Template User Guide
You can find IA support resources at www.instantatlas.com/support.xhtml.
InstantAtlas customers can login to their My InstantAtlas account at
www.instantatlas.com/mia and download a wide range of support
resources and access a searchable knowledgebase. If these resources do
not provide a solution, please contact your support provider.
© GeoWise Ltd. 2013
Page 3
Download