Click here to launch JSviewer demo.
tips & tricks
E-mail comments or questions here.
Donations are accepted via
Cookies allow you to make global customizations to all JSviewer instances on your website.
Variables allow you to make customizations to a single instance of JSviewer.
The language cookie is a special case and takes precedence over the default language variable.
You can set defaults using cookies in your HTML file prior to starting JSviewer.
You can set these defaults in your script with the following code:
In this example, image controls are set to rkh, which look like:
2. Dallas skyline
3. Golden Gate Bridge
4. Brooklyn Bridge
5. Times Square
6. Manhattan from WTC
7. Central Park
8. American Flag
9. Guadalupe River
10. Tucson sunrise
11. Lake Whitney sunset
12. Millinium sunset
15. Google Logo
JSviewer options are set to CAPTIONS | CONTROLS | EFFECTS | PRECACHE, which means image descriptions are displayed, image controls are displayed at the bottom of the screen, image zooming is disabled, pre-caching is enabled and Internet Explorer transitions are enabled and hard coded to type Fade lasting 0.75 seconds using 100% overlap of images.
To set a JSviewer cookie, call the setCookie function after jsviewer.js has been loaded.
You can set or clear individual options by calling the setOption and clearOption functions.
This allows you to individually access some options without having to set all of the options at once using the setCookie function.
Below is an example of how to turn on controls and thumbnails while turning off the debugger:
Defaults set using cookies are global to your web site.
This means any JSviewer defaults set in http://www.yoursite.com/vacation also set defaults in http://www.yoursite.com/people.
This is useful because you can set defaults for your entire web site from the top level page instead of having to put them in every HTML file that calls JSviewer.
To set a JSviewer variable, simply assign a value to it after loading jsviewer.js as shown in the following example:
Copyright © 2002-2006 Seann Herdejurgen