p27rpy
New Member
I have noticed how alot of people here post huge images that take up the whole screen, making you scroll to see the whole thing (yes, im guilty too). i like how TeamIntegra.net has an automatic picture resizing code in it, so that it resizes pictures to a pre-determined size, and you click on it to see a bigger image. (example of one of my TI.net threads with auto-resized pics) i researched it, and found this code:
and just call <body onLoad="ResizeImages()"> []
if you put that code in, it should automatically resize all the pics in the forum, and its something that i think would be very beneficial. think about it!
thanks
theo
Link was found here . it was actually posted by MorningZ, the owner of TI.net!
Code:
function ResizeImages() {
var MaxWidth = 640;
var img, hgt, wdth;
for(var i=0;i < document.images.length; i++) {
if (document.images[i].width > MaxWidth) {
img = document.images[i];
wdth = img.width;
hgt = img.height;
img.width = MaxWidth;
img.style.border = 'solid 2px #0000ff';
img.title = 'Click to See Full Size Image (' + wdth + ' x ' + hgt + ' Pixels)';
if (window && window.event) {
img.style.cursor = 'hand';
img.onclick = function (e) {window.open(window.event.srcElement.src)}
}
else {
img.style.cursor = 'pointer';
img.onclick = function (e) {window.open(e.target.src)}
}
}
}
}
if you put that code in, it should automatically resize all the pics in the forum, and its something that i think would be very beneficial. think about it!
thanks
theo
Link was found here . it was actually posted by MorningZ, the owner of TI.net!
Last edited: