Leik my code? 
I got bored today and made this!





Essentially a went into my image dump, grabbed 264 images, used a mass renamer to make them all... numbered n stuff, and wrote a piece of javascript to display a random image... not hard.. but im new at this whole coding game :)

Click the image to see it in full sized glory.

The randomizer will also be sitting on the sidebar from now on.

enjoy my random images while i keep them here :D

For everyone who actually wants to see said code. here it is!

<script>
// Image Randomizer!
// A test script to generate a random image based on numbered image filenames
// enjoy
// R4N



var roll = 0;
var loc = "";


// Root Folder!
var imlocation = "http://intartubes.com/IMG3/";
//

// IMAGE WIDTH!
var width2 = 220
//


var newwindow = ''
function popitup(url) {
if (newwindow.location && !newwindow.closed) {
newwindow.location.href = url;
newwindow.focus(); }
else {
newwindow=window.open(url,'Image','width=800,height=600,resizable=0');}
}


roll = Math.floor(Math.random() * 264) + 1;

if (roll < 10) {

roll = "00" + roll
}

if (roll >= 10 && roll < 100) {

roll = "0" + roll
}

else {
roll = roll
}


loc = imlocation + roll + ".jpg";

document.write("<center>");
document.write("<h2>Random Pictures!</h2>");
document.write("<a href='javascript:popitup(loc)'>" + "<img src='" + imlocation + roll + ".jpg'" + " width=" + width2+ ">" + "</img>" + "</a>");
document.write("</center>");
</script>


R4N


[ add comment ] ( 2 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 111 )

<<First <Back | 1 | 2 | 3 | 4 | Next> Last>>