1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4 <title>GreyBox - Advance usage</title>
6 <script type="text/javascript">
7 var GB_ROOT_DIR = "./greybox/";
10 <script type="text/javascript" src="greybox/AJS.js"></script>
11 <script type="text/javascript" src="greybox/AJS_fx.js"></script>
12 <script type="text/javascript" src="greybox/gb_scripts.js"></script>
13 <link href="greybox/gb_styles.css" rel="stylesheet" type="text/css" media="all" />
15 <script type="text/javascript" src="static_files/help.js"></script>
16 <link href="static_files/help.css" rel="stylesheet" type="text/css" media="all" />
22 insertMenu('adv_usage');
25 <h2>Methods for showing windows</h2>
27 <h3 class="first">GB_show</h3>
32 'GB_show(caption, url, /*optional*/ height, width, callback_fn)'
39 '<a href="http://google.com/" onclick="return GB_show(\'Google\', this.href)">Visit Google</a>'
43 <h4>Example rendered:</h4>
44 <a href="http://google.com/" onclick="return GB_show('Google', this.href)">Visit Google</a>
47 <h3>GB_showCenter</h3>
52 'GB_showCenter(caption, url, /* optional */ height, width, callback_fn)'
59 '<a href="http://google.com/" onclick="return GB_showCenter(\'Google\', this.href)">Visit Google</a>'
63 <h4>Example rendered:</h4>
64 <a href="http://google.com/" onclick="return GB_showCenter('Google', this.href)">Visit Google</a>
67 <h3>GB_showFullScreen</h3>
72 'GB_showFullScreen(caption, url, callback_fn)'
79 '<a href="http://google.com/" onclick="return GB_showFullScreen(\'Google\', this.href)">Visit Google</a>'
83 <h4>Example rendered:</h4>
84 <a href="http://google.com/" onclick="return GB_showFullScreen('Google', this.href)">Visit Google</a>
86 <h2>Methods for showing overlays</h2>
88 <h3 class="first">GB_showImage</h3>
92 'GB_showImage(caption, url, callback_fn)'
99 '<a href="http://static.flickr.com/119/294309231_a3d2a339b9.jpg"\n'+
100 'onclick="return GB_showImage(\'Flower\', this.href)">A flower in my hand</a>'
104 <h4>Example rendered:</h4>
105 <a href="http://static.flickr.com/119/294309231_a3d2a339b9.jpg" onclick="return GB_showImage('Flower', this.href)">A flower in my hand</a>
111 'GB_showPage(caption, url, callback_fn)'
118 '<a href="http://google.com" onclick="return GB_showPage(\'Google\', this.href)">Show Google in another layout</a>'
122 <h4>Example rendered:</h4>
123 <a href="http://google.com" onclick="return GB_showPage('Google', this.href)">Show Google in another layout</a>
126 <h2>Methods for showing sets</h2>
128 <h3 class="first">GB_showFullScreenSet</h3>
132 'GB_showFullScreenSet(set, start_index, callback_fn)'
140 "var page_set = [{'caption': 'Google', 'url': 'http://google.com/'},",
141 " {'caption': 'Yahoo', 'url': 'http://yahoo.com/'}];",
143 '<a href="#" onclick="return GB_showFullScreenSet(page_set, 1)">Show first page in page_set</a>'
147 <h4>Example rendered:</h4>
149 var page_set = [{'caption': 'Google', 'url': 'http://google.com/'},
150 {'caption': 'Yahoo', 'url': 'http://yahoo.com/'}];
152 <a href="#" onclick="return GB_showFullScreenSet(page_set, 1)">Show first page in page_set</a>
154 <h3>GB_showImageSet</h3>
158 'GB_showImageSet(set, start_index, callback_fn)'
166 "var image_set = [{'caption': 'Flower', 'url': 'http://static.flickr.com/119/294309231_a3d2a339b9.jpg'},",
167 " {'caption': 'Nice waterfall', 'url': 'http://www.widerange.org/images/large/plitvicka.jpg'}];",
169 '<a href="#" onclick="return GB_showImageSet(image_set, 1)">Show first picture in image_set</a>'
173 <h4>Example rendered:</h4>
175 var image_set = [{'caption': 'Flower', 'url': 'http://static.flickr.com/119/294309231_a3d2a339b9.jpg'},
176 {'caption': 'Nice waterfall', 'url': 'http://www.widerange.org/images/large/plitvicka.jpg'}];
178 <a href="#" onclick="return GB_showImageSet(image_set, 1)">Show first picture in image_set</a>