<head> <meta http-equiv='Content-Type' content='text/html;charset=ISO-8859-1'> <title><%WindowTitle%></title> <style type='text/css'> td.title { height: 150px; width: 160px; padding: 10px; border: 3px solid #666666; border-top: none; vertical-align: bottom; } </style> <script language="JavaScript" type="text/javascript"><!-- var image = new Array(); image[0] = 'http://i48.photobucket.com/albums/f227/wasaaaaa/1.jpg' ; image[1] = 'http://i48.photobucket.com/albums/f227/wasaaaaa/2.jpg' ; image[2] = 'http://i48.photobucket.com/albums/f227/wasaaaaa/3.jpg' ; image[3] = 'http://i48.photobucket.com/albums/f227/wasaaaaa/4.jpg' ; image[4] = 'http://i48.photobucket.com/albums/f227/wasaaaaa/5.jpg' ; var index = Math.floor(Math.random() * image.length); document.write('<style type="text/css"> td.title { background-image: url('+ image[index] +') } </style>'); //--> </script> </head> <body> <table width='550' cellpadding='0' cellspacing='0'> <tr><td class='title' colspan='2'><h1><%Title%> </h1></td> <td class='title' colspan='2'><h1><%Title%> </h1></td> <td class='title' colspan='2'><h1><%Title%> </h1></td> <td class='title' colspan='2'><h1><%Title%> </h1></td></tr> <tr> <td class='leftside' width='550' valign='top'> <!-- BEGIN LEFT SIDE --> </td></tr></table> </body>
<html> <head> <meta http-equiv='Content-Type' content='text/html;charset=ISO-8859-1'> <title><%WindowTitle%></title> <style type='text/css'> td.title { height: 150px; width: 160px; padding: 10px; border: 3px solid #666666; border-top: none; vertical-align: bottom; } td.titles { height: 150px; width: 160px; border: 3px solid #666666; border-top: none; vertical-align: bottom; } td.titled { height: 150px; width: 160px; border: 3px solid #666666; border-top: none; vertical-align: bottom; } td.titlef { height: 150px; width: 160px; border: 3px solid #666666; border-top: none; vertical-align: bottom; } </style> <script language="JavaScript" type="text/javascript"><!-- var image = new Array(); image[0] = 'http://i48.photobucket.com/albums/f227/wasaaaaa/1.jpg' ; image[1] = 'http://i48.photobucket.com/albums/f227/wasaaaaa/2.jpg' ; image[2] = 'http://i48.photobucket.com/albums/f227/wasaaaaa/3.jpg' ; image[3] = 'http://i48.photobucket.com/albums/f227/wasaaaaa/4.jpg' ; image[4] = 'http://i48.photobucket.com/albums/f227/wasaaaaa/5.jpg' ; var index = Math.floor(Math.random() * image.length); var indexb; var indexc; var indexd; if (index>=0 && index<3) indexb = index + 2; else indexb = index - 2; if (index!=4) indexc = index + 1; if (index!=0) indexd = index - 1; document.write('<style type="text/css"> td.title { background-image: url('+ image[index] +') } </style>'); document.write('<style type="text/css"> td.titles { background-image: url('+ image[indexb] +') } </style>'); document.write('<style type="text/css"> td.titled { background-image: url('+ image[indexc] +') } </style>'); document.write('<style type="text/css"> td.titlef { background-image: url('+ image[indexd] +') } </style>'); //--> </script> </head> <body> <table width='550' cellpadding='0' cellspacing='0'> <tr><td class='title' colspan='2'><h1><%Title%> </h1></td> <td class='titles' colspan='2'><h1><%Title%> </h1></td> <td class='titled' colspan='2'><h1><%Title%> </h1></td> <td class='titlef' colspan='2'><h1><%Title%> </h1></td></tr> <!-- BEGIN LEFT SIDE --> </td></tr></table> </body> </html>
<html> <head> <meta http-equiv='Content-Type' content='text/html;charset=ISO-8859-1'> <title><%WindowTitle%></title> <style type='text/css'> td.title { height: 177px; width: 165px; padding: 0px; border: 1px solid #666666; border-top: none; vertical-align: bottom; } td.titles { height: 177px; width: 165px; border: 1px solid #666666; border-top: none; vertical-align: bottom; } td.titled { height: 177px; width: 165px; border:1px solid #666666; border-top: none; vertical-align: bottom; } td.titlef { height: 177px; width: 165px; border: 1px solid #666666; border-top: none; vertical-align: bottom; } </style> <script language="JavaScript" type="text/javascript"><!-- var image = new Array(); image[0] = 'http:kqimageserver.com/pwimages/new/testimages/random1.jpg' ; image[1] = 'http:kqimageserver.com/pwimages/new/testimages/random2.jpg' ; image[2] = 'http:kqimageserver.com/pwimages/new/testimages/random3.jpg' ; image[3] = 'http:kqimageserver.com/pwimages/new/testimages/random4.jpg' ; image[4] = 'http:kqimageserver.com/pwimages/new/testimages/random5.jpg' ; image[5] = 'http:kqimageserver.com/pwimages/new/testimages/random6.jpg' ; image[6] = 'http:kqimageserver.com/pwimages/new/testimages/random.jpg' ; var index = Math.floor(Math.random() * image.length); var indexb; var indexc; var indexd; if (index>=0 && index<3) indexb = index + 2; else indexb = index - 2; if (index!=4) indexc = index + 1; if (index!=0) indexd = index - 1; document.write('<style type="text/css"> td.title { background-image: url('+ image[index] +') } </style>'); document.write('<style type="text/css"> td.titles { background-image: url('+ image[indexb] +') } </style>'); document.write('<style type="text/css"> td.titled { background-image: url('+ image[indexc] +') } </style>'); document.write('<style type="text/css"> td.titlef { background-image: url('+ image[indexd] +') } </style>'); //--> </script> </head> <body> <table width='660' cellpadding='0' cellspacing='0'> <tr> <td class='title'><h1><%Title%> </h1></td> <td class='titles'><h1><%Title%> </h1></td> <td class='titled'><h1><%Title%> </h1></td> <td class='titlef'><h1><%Title%> </h1></td></tr> <!-- BEGIN LEFT SIDE --> </td></tr></table> </body> </html>
<html> <head> <meta http-equiv='Content-Type' content='text/html;charset=ISO-8859-1'> <title><%WindowTitle%></title> <style type='text/css'> td.title { height: 177px; width: 165px; padding: 0px; border: 1px solid #666666; border-top: none; vertical-align: bottom; } td.titles { height: 177px; width: 165px; border: 1px solid #666666; border-top: none; vertical-align: bottom; } td.titled { height: 177px; width: 165px; border: 1px solid #666666; border-top: none; vertical-align: bottom; } td.titlef { height: 177px; width: 165px; border: 1px solid #666666; border-top: none; vertical-align: bottom; } td.titleg { height: 177px; width: 165px; border: 1px solid #666666; border-top: none; vertical-align: bottom; } td.titleh { height: 177px; width: 165px; border: 1px solid #666666; border-top: none; vertical-align: bottom; } td.titlej { height: 177px; width: 165px; border: 1px solid #666666; border-top: none; vertical-align: bottom; } </style> <script language="JavaScript" type="text/javascript"><!-- var image = new Array(); image[0] = 'http://kqimageserver.com/pwimages/new/testimages/random1.jpg' ; image[1] = 'http://kqimageserver.com/pwimages/new/testimages/random2.jpg' ; image[2] = 'http://kqimageserver.com/pwimages/new/testimages/random3.jpg' ; image[3] = 'http://kqimageserver.com/pwimages/new/testimages/random4.jpg' ; image[4] = 'http://kqimageserver.com/pwimages/new/testimages/random5.jpg' ; image[5] = 'http://kqimageserver.com/pwimages/new/testimages/random6.jpg' ; image[6] = 'http://kqimageserver.com/pwimages/new/testimages/random.jpg' ; var index = Math.floor(Math.random() * image.length); var indexb; var indexc; var indexd; var indexf; var indexg; var indexh; if (index == 0) {indexb = index + 1; indexc = index + 2; indexd = index + 3; indexf = index + 4; indexg = index + 5; indexh = index + 6;} else if (index == 1) {indexb = index - 1; indexc = index + 1; indexd = index + 2; indexf = index + 3; indexg = index + 4; indexh = index + 5;} else if (index == 2) {indexb = index - 2; indexc = index - 1; indexd = index + 1; indexf = index + 2; indexg = index + 3; indexh = index + 4;} else if (index == 3) {indexb = index - 3; indexc = index - 2; indexd = index - 1; indexf = index + 1; indexg = index + 2; indexh = index + 3;} else if (index == 4) {indexb = index - 4; indexc = index - 3; indexd = index - 2; indexf = index - 1; indexg = index + 1; indexh = index + 2;} else if (index == 5) {indexb = index - 5; indexc = index - 4; indexd = index - 3; indexf = index - 2; indexg = index - 1; indexh = index + 1;} else if (index == 6) {indexb = index - 6; indexc = index - 5; indexd = index - 4; indexf = index - 3; indexg = index - 2; indexh = index - 1;} else if (index == 7) {indexb = index - 7; indexc = index - 6; indexd = index - 5; indexf = index - 4; indexg = index - 3; indexh = index - 2;} d = document; d.write('<style type="text/css"> td.title { background-image: url('+ image[index] +') } </style>'); d.write('<style type="text/css"> td.titles { background-image: url('+ image[indexb] +') } </style>'); d.write('<style type="text/css"> td.titled { background-image: url('+ image[indexc] +') } </style>'); d.write('<style type="text/css"> td.titlef { background-image: url('+ image[indexd] +') } </style>'); d.write('<style type="text/css"> td.titleg { background-image: url('+ image[indexf]+') } </style>'); d.write('<style type="text/css"> td.titleh { background-image: url('+ image[indexg]+') } </style>'); d.write('<style type="text/css"> td.titlej { background-image: url('+ image[indexh]+') } </style>'); //--> </script> </head> <body> <table width='660' cellpadding='0' cellspacing='0'> <tr><td class='title' colspan='2'><h1><%Title%> </h1></td> <td class='titles' colspan='2'><h1><%Title%> </h1></td> <td class='titled' colspan='2'><h1><%Title%> </h1></td> <td class='titlef' colspan='2'><h1><%Titlw%> </h1></td> <td class='titleg' colspan='2'><h1><%Title%> </h1></td> <td class='titleh' colspan='2'><h1><%Title%> </h1></td> <td class='titlej' colspan='2'><h1><%Title%> </h1></td></tr> <!-- BEGIN LEFT SIDE --> </td></tr></table> </body> </html>
var index = Math.floor(Math.random() * image.length); var indexb; var indexc; var indexd; if (index>=0 && index<3) indexb = index + 2; else indexb = index - 2; if (index!=4) indexc = index + 1; if (index!=0) indexd = index - 1;
<asp:Content ContentPlaceHolderID="cphBody" runat="server"> <style type='text/css'> td.titlea { height: 174px; width: 140px; padding: 0px; border: 1px solid #eeeeee; vertical-align: bottom; margin-right:2px; } td.titleb { height: 174px; width: 160px; border: 1px solid #eeeeee; vertical-align: bottom; margin-right:2px; } td.titlec { height: 174px; width: 140px; border:1px solid #eeeeee; vertical-align: bottom; margin-right:2px; } td.titled { height: 174px; width: 140px; border: 1px solid #eeeeee; vertical-align: bottom; margin-right:2px; } </style> <script language="JavaScript" type="text/javascript"><!-- var image = new Array(); image[0] = 'https://www.kqimageserver.com/pwimages/new/testimages/random1.jpg' ; image[1] = 'https://www.kqimageserver.com/pwimages/new/testimages/random2.jpg' ; image[2] = 'https://www.kqimageserver.com/pwimages/new/testimages/random3.jpg' ; image[3] = 'https://www.kqimageserver.com/pwimages/new/testimages/random4.jpg' ; image[4] = 'https://www.kqimageserver.com/pwimages/new/testimages/random5.jpg' ; image[5] = 'https://www.kqimageserver.com/pwimages/new/testimages/random6.jpg' ; image[6] = 'https://www.kqimageserver.com/pwimages/new/testimages/random.jpg' ; image[7] = 'https://www.kqimageserver.com/pwimages/new/testimages/random7.jpg' ; image[8] = 'https://www.kqimageserver.com/pwimages/new/testimages/random8.jpg' ; image[9] = 'https://www.kqimageserver.com/pwimages/new/testimages/random9.jpg' ; image[10] = 'https://www.kqimageserver.com/pwimages/new/testimages/random10.jpg' ; var index = Math.floor(Math.random() * image.length); var indexb; var indexc; var indexd; if (index>=0 && index<5) indexb = index + 2; else indexb = index - 2; if (index!=4) indexc = index + 1; if (index!=0) indexd = index - 1; document.write('<style type="text/css"> td.titlea { background-image: url('+ image[index] +') } </style>'); document.write('<style type="text/css"> td.titleb { background-image: url('+ image[indexb] +') } </style>'); document.write('<style type="text/css"> td.titlec { background-image: url('+ image[indexc] +') } </style>'); document.write('<style type="text/css"> td.titled { background-image: url('+ image[indexd] +') } </style>'); //--> </script> <table border="0" width="665" cellpadding="0" cellspacing="0" align="left"> <tr align="left"> <td class="flash" valign="top"> <div align="left"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="630" height="220"> etc </embed> </object> <br /> <table class="signup"><tr> <td width="159" height="26" align="center"><span>REQUEST A CATALOG </span> </td> <td class="divider" width="471" align="left"><span>EMAIL UPDATES </span> <asp:TextBox id="txtEmail" runat="server" Width="112px" CssClass="email_text"></asp:TextBox> <asp:Button id="btnSubmitEmail" runat="server" Text="sign up" CssClass="email_button" CausesValidation="true"></asp:Button><span>Join now!</span> <a href="http://newpw.delphi-ts.net/signup.aspx"><span>Why?</span></a></span> </td> </tr></table> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail" ErrorMessage="You must enter a valid email address." ValidationExpression="\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\b" CssClass="required" ForeColor=""></asp:RegularExpressionValidator> </div> </td> </tr> <tr valign="top" align="center"> <td align="center"><p> <table width='630' cellpadding='0' cellspacing='0' bgcolor="#ffffff" align="left" style="margin-left:6px;"> <tr> <td class='titlea' style="width:157px"><h1> </h1></td> <td class='titleb' style="width:157px"><h1> </h1></td> <td class='titlec' style="width:157px"><h1> </h1></td> <td class='titled' style="width:157px"><h1> </h1></td></tr> </tr> </table> <p></p> <p></p> <p></p> </td> </tr> </table> </asp:Content>
<html> <head> <title> Genrator of random images </title> <style type='text/css'> td{ height: 174px; width: 157px; padding: 0px; border: 1px solid #eeeeee; vertical-align: bottom; margin-right:2px; } </style> </head> <body> <script language="JavaScript" type="text/javascript"> function getRandom (min, max){ return min + Math.floor(Math.random() * (max - min + 1)); } d = document; var images = new Array() images[0] = 'https://www.kqimageserver.com/pwimages/new/testimages/random.jpg' ; images[1] = 'https://www.kqimageserver.com/pwimages/new/testimages/random1.jpg' ; images[2] = 'https://www.kqimageserver.com/pwimages/new/testimages/random2.jpg' ; images[3] = 'https://www.kqimageserver.com/pwimages/new/testimages/random3.jpg' ; images[4] = 'https://www.kqimageserver.com/pwimages/new/testimages/random4.jpg' ; images[5] = 'https://www.kqimageserver.com/pwimages/new/testimages/random5.jpg' ; images[6] = 'https://www.kqimageserver.com/pwimages/new/testimages/random6.jpg' ; images[7] = 'https://www.kqimageserver.com/pwimages/new/testimages/random7.jpg' ; images[8] = 'https://www.kqimageserver.com/pwimages/new/testimages/random8.jpg' ; images[9] = 'https://www.kqimageserver.com/pwimages/new/testimages/random9.jpg' ; images[10] = 'https://www.kqimageserver.com/pwimages/new/testimages/random10.jpg' ; var selected = new Array (); var count = 4; cnt = 0; for(var i = 0;i < count;i++){ while(true){ selected[i] = getRandom(0, images.length-1); isUnique = true; for(var j = i-1; j >= 0 ;j--){ cnt++; if(selected[i] == selected[j]){ isUnique = false; break; } } if(isUnique) break; } } alert(cnt); for(i = 0;i < count;i++){ d.write('<style type="text/css"> td.title'+(i+1)+' { background-image: url('+ images[selected[i]] +') } </style>'); } </script> <table> <tr> <td class='title1'></td> <td class='title2'></td> <td class='title3'></td> <td class='title4'></td> <tr/> </table> </body> </html>
| DaniWeb Message | |
| Cancel Changes | |