| | |
SiteShow -- Create a slideshow of web pages
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
This is a simple to use, self-contained website slideshow utility. Do you have a monitor or TV setup in your lobby where you'd like to present web content automatically? With this HTML/Javascript page, simply edit an array of pages or "slides". You define a title, duration, and URL for each slide. The pages fade out and fade in between slides. You can change the fade out color as desired.
SiteShow features a small menu that automatically appears (fades in) if you mouseover the page. The menu allows you to pause or play or directly access a specific slide.
Simply copy the code below into a new HTML page and load it in your browser to see how it works. Then change the slide URL's to whatever pages you want to load. Slides can be your own web pages, pictures, or any other web page.
Tip: Press F11 to put your browser in full-screen mode. Also, in IE, right-click the menu bar at top and select Auto-hide.
Using SiteShow in fullscreen mode can generate a very nice display for your lobby TV or a computer in a public area. Perhaps you want to create a slideshow of your company's products using your existing company website pages.
More details at http://www.troywolf.com/articles/client/siteshow/
SiteShow features a small menu that automatically appears (fades in) if you mouseover the page. The menu allows you to pause or play or directly access a specific slide.
Simply copy the code below into a new HTML page and load it in your browser to see how it works. Then change the slide URL's to whatever pages you want to load. Slides can be your own web pages, pictures, or any other web page.
Tip: Press F11 to put your browser in full-screen mode. Also, in IE, right-click the menu bar at top and select Auto-hide.
Using SiteShow in fullscreen mode can generate a very nice display for your lobby TV or a computer in a public area. Perhaps you want to create a slideshow of your company's products using your existing company website pages.
More details at http://www.troywolf.com/articles/client/siteshow/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- SlideShow v1.0 Troy Wolf <troy@troywolf.com> Simply define your "slides" in the javascript slides[] array below. --> <html> <head> <title>SiteShow 1.0</title> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <style> /* Change body background-color to change fade out color. */ body.siteshow { margin:0; padding:0; background-color:#000000; } #menu { font-family:Arial; font-size:9pt; display:none; opacity:0.00; -mozopacity:0.00; filter:alpha(opacity=0); position:absolute; top:10px; left:10px; padding:5px; background-color:#000000; color:#FFFFFF; border:3px dotted #999999; } #menu a { color:#ffffff; } #menu a:hover { text-decoration:none; } #title { font-size:11pt; font-weight:bold; letter-spacing:2; } #slides { font-size:9pt; line-height:16pt; } .button { width:60px; font-size:9pt; letter-spacing:1; } </style> <script type="text/javascript"> var current_idx = 0; var slides = new Array(); var menuwin; var show_timer; var menu_timer; var menu; var content; var loaded = true; // Define your "slides". 3 values for each are: // 1. Duration in seconds. // 2. Title to be used in menu. // 3. Source URL. Can be full URI or a relative URL. slides[1] = new Array(15, "WAMP HOWTO", "http://www.troywolf.com/articles/wamp_howto.htm"); slides[2] = new Array(15, "PHP Proxy", "http://www.troywolf.com/articles/php/class_http/proxy.phps"); slides[3] = new Array(15, "HTTP class", "http://www.troywolf.com/articles/php/class_http/"); slides[4] = new Array(15, "Session class", "http://www.troywolf.com/articles/php/class_session/"); slides[5] = new Array(15, "RSS Consumption", "http://www.troywolf.com/articles/php/class_xml/rss_example.php"); slides[6] = new Array(15, "PHP Exchange WebDAV", "http://www.troywolf.com/articles/php/exchange_webdav_examples.php"); slides[7] = new Array(15, "vCard class", "http://www.troywolf.com/articles/php/class_vcard/"); function MenuInit() { var html = ""; for(idx=1; idx<slides.length; idx++) { html += '<a href="javascript:Navigate('+idx+')">' + slides[idx][1] + "</a><br />\n"; } document.getElementById("slides").innerHTML = html; menu.style.display = "block"; } function MenuShow() { clearTimeout(menu_timer); opacity('menu', 0, 90, 500); menu_timer = setTimeout("MenuHide()", 3500); } function MenuHide() { opacity('menu', 90, 0, 500); } function Pause() { clearTimeout(show_timer); document.getElementById('play').style.display = "block"; document.getElementById('pause').style.display = "none"; } function Navigate(slide_idx) { clearTimeout(show_timer); if (current_idx == 0) { if (!slide_idx) { slide_idx = 1; } current_idx = slide_idx; content.src = slides[current_idx][2]; document.getElementById('play').style.display = "none"; document.getElementById('pause').style.display = "block"; show_timer = setTimeout("Navigate()", slides[current_idx][0]*1000); return; } if (slide_idx) { current_idx = slide_idx; content.src = slides[current_idx][2]; document.getElementById('play').style.display = "block"; document.getElementById('pause').style.display = "none"; return; } loaded = false; current_idx++; if ( current_idx == slides.length) { current_idx = 1; } opacity('content', 100, 0, 500); document.getElementById('play').style.display = "none"; document.getElementById('pause').style.display = "block"; show_timer = setTimeout("Navigate()", slides[current_idx][0]*1000); return; } function opacity(id, opacStart, opacEnd, millisec) { //speed for each frame var speed = Math.round(millisec / 100); var timer = 0; //determine the direction for the blending, if start and end are the same nothing happens if(opacStart > opacEnd) { for(i = opacStart; i >= opacEnd; i--) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++; } if (opacEnd == 0) { setTimeout("FadeOutTrigger('"+id+"')",((timer-1) * speed));; } //if (opacEnd == 0) { FadeOutTrigger(id); } } else if(opacStart < opacEnd) { if (opacStart == 0) { FadeInTrigger(id); } for(i = opacStart; i <= opacEnd; i++) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++; } } } //change the opacity for different browsers function changeOpac(opacity, id) { var object = document.getElementById(id).style; object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")"; } function FadeOutTrigger(id) { //alert('FadeOut: '+id); switch(id) { case "menu": document.getElementById(id).style.display = "none"; break; case "content": content.src = slides[current_idx][2]; //setTimeout("opacity('content', 0, 100, 500)", 1000); break; default: break; } } function FadeInTrigger(id) { //alert('FadeIn: '+id); switch(id) { case "menu": document.getElementById(id).style.display = "block"; break; case "content": //opacity('content', 0, 100, 500); break; default: break; } } function FadeInContent() { if (!loaded) { opacity('content', 0, 100, 500); loaded = true; } } function LoadTrigger() { //self.resizeTo(1366,768); menu = document.getElementById('menu'); content = document.getElementById('content'); Navigate(); MenuInit(); MenuShow(); } window.onload = LoadTrigger; </script> </head> <body class="siteshow"> <iframe id="content" name="content" style="width:100%; height:100%;" frameborder="no" scrolling="auto" src="" onmouseover="MenuShow();" onload="FadeInContent();" ></iframe> <div id="menu"> <div id="title">SiteShow Menu</div> <div id="slides"> </div> <p> <input id="pause" class="button" style="display:block;" type="button" value="pause" onclick="Pause()" /> <input id="play" class="button" style="display:none;" type="button" value="play" onclick="Navigate()" /> </p> </div> </body> </html>
0
•
•
•
•
This was really beautiful.
I'm trying to have a slideshow of webpages. But unlike Troy's code I want the slideshow to appear as a module of a webpage.
An iframe is not the solution because it would just show one corner of the page.
Does anyone know of a solution where you can enter a series of links, it browses the links, takes snapshots of the webpages, resizes them, then makes a slideshow of the resized images with the images being links to the actual webpage.
Ha ha BTW I'm not a programmer. Can only write very basic stuff.
email:
mikekogel AT gmail DOT com
I'm trying to have a slideshow of webpages. But unlike Troy's code I want the slideshow to appear as a module of a webpage.
An iframe is not the solution because it would just show one corner of the page.
Does anyone know of a solution where you can enter a series of links, it browses the links, takes snapshots of the webpages, resizes them, then makes a slideshow of the resized images with the images being links to the actual webpage.
Ha ha BTW I'm not a programmer. Can only write very basic stuff.
email:
mikekogel AT gmail DOT com
Similar Threads
- How to create new web pages from code (ASP.NET)
- how do i generate new pages from a databse and create links for those pages in asp.ne (ASP.NET)
- How can I create dynamic thumbnails of Web Pages (PHP)
- help!..VerySimple web browser(display source code of web pages) (JSP)
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxcode ajaxhelp animate array automatically autoplay beta boarder box bug calendar captcha card cart codes column cookies createrange() css cursor date debugger decimal design developer dom download dropdown element enter error events firefox firehose flash focus form frameworks getselection google gwt html htmlform iframe image() images index java javascript javascripts jawascriptruntimeerror jquery jsp listbox maps marquee masterpage menu microsoft mimic mp3 mp4 offline onmouseover parameters php player post problem programming progressbar prototype rating redirect regex safari scale scriptlets search select size sources sql starrating text textarea toggle twitter validation variables w3c web website window windowofwords windowsxp xml xspf



