<?xml version="1.0" encoding="UTF-16"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en_US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-16" /> <meta name="robots" content="index,follow" /> <meta name="Description" content="utf-16 jsp custom tag class output of a dhtml slideshow script" /> <meta name="keywords" content="jsp,custom,tag,slideshow,dhtml" /> <meta name="Author" content="nicephotog@gmail.com SUcommanderXer Last Pre Beta" /> <title>UTF-16 JSP TAG SLIDESHOW</title> <style type="text/css"> a{ color:rgb(64,16,48); font-weight:bold; text-decoration:none; font-family:times,verdana,pump demi let bold; } td{ padding:10px; background-color:rgb(153,51,0); border:3px rgb(255,204,153) solid; } input{ width:200px; color:rgb(153,51,0); font-weight:bold; } select{ width:200px; color:rgb(153,51,0); font-weight:bold; } textarea{ color:rgb(153,51,0); font-weight:bold; } </style> </head> <body style="font-family:arial,verdana,bookman old style;color:rgb(255,255,255);background-image:url('http://www.nicephotog-jsp.net/images/page-body-bgrnd.gif');background-color:rgb(200,153,100);margin-top:180px;width:100%;"> <center> <a href="http://www.nicephotog-jsp.net/index.jsp" title="BACK TO THE HOME PAGE"> <img src="http://www.nicephotog-jsp.net/images/jsp.net.header.gif" width="600" height="80" alt="nicephotog-jsp.net back to home link" border="0" /> </a> <p /> JSP CUSTOM TAG CLASS TO WRITE A DHTML SLIDESHOW (UTF-16 PAGE OUTPUT) <table id='nicephotogjspcustomstagslideshow' style='width:80%;font-size:8pt;color:rgb(100,255,100);border:3px rgb(200,240,255) solid;'> <!-- nicephotogs JSP Servlet Custom Tag DHTML Slideshow created by SUcommanderXer Last Pre Beta www.nicephotog-jsp.net --> <tbody align='center'> <tr><td style='border:0px;'> <img src='http://www.nicephotog-jsp.net/test/44440674.jpg' id='nicephotogcustomjsptagimage' alt='slideshow image' style='border:3px rgb(200,240,255) solid;' /> </td></tr><tr><td style='border:0px;'> <input type='button' id='backbutt' onclick='backImg();' value='back' style='width:20%;font-size:12px;color:rgb(100,255,100);background-color:rgb(80,50,80);border:3px rgb(90,70,90) solid;' /> <input type='button' id='ststpbtt' onclick='sldOpSys();' value='stop' style='width:20%;font-size:12px;color:rgb(100,255,100);background-color:rgb(80,50,80);border:3px rgb(90,70,90) solid;' /> <input type='button' id='forbutt' onclick='forImg();' value='next' style='width:20%;font-size:12px;color:rgb(100,255,100);background-color:rgb(80,50,80);border:3px rgb(90,70,90) solid;' /> [ Speed <select onchange='speedersystim(this.selectedIndex);' style='width:20%;font-size:8pt;color:rgb(100,255,100);background-color:rgb(80,50,80);border:3px rgb(90,70,90) solid;'> <option> 1 </option> <option> 2 </option> <option selected="selected"> 3 </option> <option> 4 </option> <option> 5 </option> <option> 6 </option> <option> 7 </option> <option> 8 </option> </select> Seconds ] </td> </tr> </tbody> </table> <script type="text/javascript" charset="utf-16"> <!-- // This script (for the DHTML javascript image slide show in a JSP Custom Tag) was written by Mr Samuel A Marchant nicephotog@gmail.com www.nicephotog-jsp.net Sydney,NSW,Australia // The JSP custom tag class that generated this script and markup called NicephotogDHTMLslideshow was written by Mr Samuel A Marchant nicephotog@gmail.com www.nicephotog-jsp.net Sydney,NSW,Australia var imagepathtoslideplate='http://www.nicephotog-jsp.net/test/'; // ''+'/' var imgnamesforslider = ['44440674.jpg','45242439.jpg','45442950.jpg','45443247.jpg','32681985.jpg','32690271.jpg','32690385.jpg','32702502.jpg','32737764.jpg','32737882.jpg','33084349.jpg','32690435.jpg']; var speedsetting = [1000,2000,3000,4000,5000,6000,7000,8000]; var stoptext='stop'; var starttext='start'; ctfunc=0; // control timeouts to fire passage ON/OFF imnum=1; // imagge array index !!!@@@ IMNUM IS SET TO ONE BECAUSE 0 INDEX IS USED FOR THE LOADED IMAGE spd=parseInt(speedsetting[3]); through=0; // function sldOpSys(){ if(ctfunc==0){ isoff(); rtctfnc(parseInt(1)); document.getElementById('nicephotogcustomjsptagimage').src=imagepathtoslideplate+imgnamesforslider[parseInt(imnum)]; document.getElementById('ststpbtt').value=starttext; }else{ rtctfnc(parseInt(0)); document.getElementById('ststpbtt').value=stoptext; ison(); //ensure ==through==variable doOne(); } } // function forImg(){ if(ctfunc==1){ psintup=imnum+1; if(psintup > (imgnamesforslider.length-1)){ resetimnum(); psintup=0; } backImNumpasser(psintup); document.getElementById('nicephotogcustomjsptagimage').src=imagepathtoslideplate+imgnamesforslider[psintup]; } } // function backImg(){ // image back button psint=0; if(ctfunc==1){ if(imnum==0){ psint=(imgnamesforslider.length-1); }else{ psint=imnum-1; } backImNumpasser(psint); document.getElementById('nicephotogcustomjsptagimage').src=imagepathtoslideplate+imgnamesforslider[psint]; } } // function backImNumpasser(numi){ imnum=numi; return imnum; } // function speedersystim(cod){ spd=parseInt(speedsetting[cod]); return spd; } // function slideIdxCheck(){ if(imnum > (imgnamesforslider.length-1)){ resetimnum(); } } // function ison(){ through=parseInt(0); return through; } // function isoff(){ through=parseInt(1); return through; } // function doOne(){ var infch = null; if((ctfunc==0) && (through==0)){ isoff(); infch = setTimeout('srChange();',parseInt(spd)); } } // function srChange(){ if(ctfunc==0){ slideIdxCheck(); document.getElementById('nicephotogcustomjsptagimage').src=imagepathtoslideplate+imgnamesforslider[imnum]; mkimnum();ison();doOne(); } } // function rtctfnc(nom){ ctfunc=parseInt(nom); return ctfunc; } // function resetimnum(){ imnum=parseInt(0); return imnum; } // function mkimnum(){ imnum++; return imnum; } // doOne(); // auto start --> </script>ÿý <p /> <div style="visibility:visible;width:80%;border:0px;position:relative;"> <table align="center" style="width:800px;background-color:rgb(255,255,255);color:rgb(0,0,0);font-size:12px;"> <tbody align="left"> <tr> <td style="width:800px;padding:5px;background-color:rgb(255,255,255);"> <span style="background-color:rgb(255,255,255);color:rgb(55,91,43);font-family:arial black;font-weight:600;">&lt;@</span> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">taglib uri=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"/WEB-INF/nicephotogDHTML.tld"</span> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">prefix=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"np"</span> <span style="background-color:rgb(255,255,255);color:rgb(55,91,43);font-family:arial black;font-weight:600;">%&gt;</span> <p /> <span style="background-color:rgb(255,255,255);color:rgb(55,91,43);font-family:arial black;font-weight:600;">&lt;np:NicephotogDHTMLslideshow</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">xorh=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"X"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">stoptext=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"stop"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">startext=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"start"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">backtext=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"back"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">forwardtext=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"next"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">timerselectstyle=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"color:rgb(100,255,100);background-color:rgb(80,50,80);border:3px rgb(90,70,90) solid;"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">buttonstyle=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"font-size:12px;color:rgb(100,255,100);background-color:rgb(80,50,80);border:3px rgb(90,70,90) solid;"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">capsulestyle=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"width:80%;color:rgb(100,255,100);border:3px rgb(200,240,255) solid;"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">imagestyle=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"border:3px rgb(200,240,255) solid;"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">servercharset=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"UTF-16"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">srcimagespath=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"http://www.nicephotog-jsp.net/test/"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(69,44,130);">srcimageslist=</span><span style="background-color:rgb(255,255,255);color:rgb(173,38,38);">"44440674.jpg,45242439.jpg,45442950.jpg,45443247.jpg,32681985.jpg,32690271.jpg,32690385.jpg,32702502.jpg, <br />32737764.jpg,32737882.jpg,33084349.jpg,32690435.jpg"</span><br /> <span style="background-color:rgb(255,255,255);color:rgb(55,91,43);font-family:arial black;font-weight:600;">/&gt;</span> <p align="left" /> This tag uses a convertor system inside to match the page ISO charset encoding. The internal text of the script is initialy written in ISO-8859-1 common english charset, on output it is required to be converted to any web based ISO that has a subset of english language characters. <p /> Other assistance for foreign language are, two variables in the script to store the "stop" and "start" button string , and the other two "back" and "next" can be set by the button id= using javascript if the page writers include another script after the tag. <br />There remains the "select" system for slideshow speed and its text to decide what to do, probably each option will need an id and the select also for dynamic re-charactering by javascript. </td> </tr> </tbody> </table> </div> </center> </body> </html>