Ah, what better place to upload than my own server.
That's right; a bit over a year ago, I wrote a nice little AJAX photo gallery, which could definitely use some work. So rather than exporting said photographs for the web, I got distracted by the dysfunction of the gallery and cracked open the code. I scroll down and see the following javascript:
function showAlbum(a) {
path = a;
var xmlhttp;
if(window.XMLHttpRequest) xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if(xmlhttp.readyState == 4) {
document.getElementById('ulfilmstrip').innerHTML = xmlhttp.responseText;
var aaa = document.images;
img_array = new Array();
for(var bb = 0; bb < aaa.length; bb++) {
if(aaa[bb].src.indexOf("cover") < 0) {
var cc = aaa[bb].src.split("/");
cc = cc[cc.length-1].split("_thmb");
img_array.push(cc[0]+cc[1]);
}
}
showImage(img_array[1]);
document.getElementById('filmHeader').innerHTML = a;
toggle();
resizeGal();
window.onresize = resizeGal;
}
}
xmlhttp.open("GET", "fetch.php?dir="+a, true);
xmlhttp.send(null);
return;
}
Okay, so
a is probably the album that we want to display…wait, what is aaa?! And bb?! And cc?!
No comments:
Post a Comment