...

View Full Version : How to replace an image with another one?



SylverCheetah53
06-08-2010, 04:41 PM
Or at least, cover it by a new one...

thresher
06-08-2010, 05:13 PM
Erm, I think we'll need a bit more information than that!

SylverCheetah53
06-08-2010, 06:18 PM
The picture from here (http://friendsforever.co.cc/) (the logo).
I want to be different on a specific section of the forum, meaning here (http://friendsforever.co.cc/viewforum.php?f=25). As you can see, I've already put an image over, using this code:

<div style="position: absolute; top: 22px; left: 32px"><img src="http://friendsforever.co.cc/templates/fiblue3d/images/cellpic_fifa.jpg" border="0"></div>
But it's not an optimal solution. First of all, yes, it looks good on viewforum, but on viewtopic (example here (http://friendsforever.co.cc/viewtopic.php?t=3305)) the image gets shrinked by a script for shrinking posted images...
I want a better solution. I've also tryed the following:

<script language="javascript">
var objDoc = document.getElementsByTagName('img')
var i
var newImage = 'http://friendsforever.co.cc/templates/fiblue3d/images/cellpic_fifa.jpg'


for (i=0; i<objDoc.length; i++) {
if (objDoc[i].src.match(/cellpic_bkg/)){
objDoc[i].src = newImage;
}
}
</script>
But it doesn't work. :(



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum