Click here to launch JSviewer demo.
home browsers features advanced features keyboard controls quick start configuration source code thumbnails tips & tricks samples download
E-mail comments or questions here. Donations are accepted via
Configuration
JSviewer defaults can be configured in two ways, using cookies or JavaScript variables. 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. JavaScript variables take precedence over cookies so that you can customize individual instances of JSviewer. The language cookie is a special case and takes precedence over the default language variable.
Setting Defaults
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:
1. Wecome 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 13. Google 14. Yahoo 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.
Cookies
The following table lists all of the JSviewer options that can be set using cookies or JavaScript variables:
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.
Variables
The following table lists all of the JSviewer options that can be set using JavaScript variables only:
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