...

View Full Version : img pops up thumb first click, full img 2nd click



tns123j
02-08-2007, 03:17 AM
http://mulqueenconsulting.com/suburbanwholesale

For some reason when you click the thumbs on your first click it pops up a thumbnail, but on your 2nd click pops the full image...very annoying..

any help?


<script type="text/javascript">

var largerView = "";
var winToggle = false;

function openFullSize(Pix){

if (winToggle){largerView.close()}
document.getElementById('nullIMG').src = Pix;
var wStr = document.getElementById('nullIMG').width;
var offsetW = wStr;
wStr = "width="+(wStr+20);
var hStr = document.getElementById('nullIMG').height;
var offsetH = hStr;
hStr = "height="+(hStr+20);
var lStr = "left="+((screen.width-50-offsetW)/2);
var tStr = "top="+((screen.availHeight-50-offsetH)/2);
largerView = window.open(Pix,"","toolbar=0,status=0,"+tStr+","+lStr+","+wStr+","+hStr+"");
winToggle = true;
}

function init(){

var nBody = document.getElementsByTagName('body')[0];
var nDiv = document.createElement('div');
var nImg = document.createElement('img');
nImg.id = "nullIMG";
nDiv.appendChild(nImg);
nBody.appendChild(nDiv);
nDiv.style.position = "absolute";
nDiv.style.top = "-2000px";
nImg.src = document.images['reference'].src;
}

onload=init;
onunload=function(){if (winToggle && !largerView.closed){largerView.close()}}

</script>


<a href='#' onclick="openFullSize('images/residential01.jpg');return false">
<img src='images/residential01t.jpg' name='reference' alt='Photo by: Don Pearse Photography: www.donpearsephotographers.com' border="0" class="whiteBorder" onMouseOut="this.style.borderColor='#FFFFFF'" onMouseOver="this.style.borderColor='#FFFF00'">
</a>

chump2877
02-08-2007, 04:30 AM
<a href='#' onclick="openFullSize('http://www.mulqueenwebdesign.com/suburbanwholesale/images/residential01.jpg');return false">
<img src='http://www.mulqueenwebdesign.com/suburbanwholesale/images/residential01t.jpg' name='reference' alt='Photo by: Don Pearse Photography: www.donpearsephotographers.com' border="0" class="whiteBorder" onMouseOut="this.style.borderColor='#FFFFFF'" onMouseOver="this.style.borderColor='#FFFF00'">
</a>


<script type="text/javascript">

var largerView = "";
var winToggle = false;

function openFullSize(Pix)
{
if (winToggle)
largerView.close()

document.getElementById('nullIMG').src = Pix;

var wStr = document.getElementById('nullIMG').width;
var offsetW = wStr;
wStr = "width="+(wStr+20);
var hStr = document.getElementById('nullIMG').height;
var offsetH = hStr;
hStr = "height="+(hStr+20);
var lStr = "left="+((screen.width-50-offsetW)/2);
var tStr = "top="+((screen.availHeight-50-offsetH)/2);
largerView = window.open(Pix,"","toolbar=0,status=0,"+tStr+","+lStr+","+wStr+","+hStr+"");
winToggle = true;
}

function init(){

var nBody = document.getElementsByTagName('body')[0];
var nDiv = document.createElement('div');
var nImg = document.createElement('img');
nImg.id = "nullIMG";
nDiv.appendChild(nImg);
nBody.appendChild(nDiv);
nDiv.style.position = "absolute";
nDiv.style.top = "-2000px";

var linkPartArr = document.images['reference'].src.split('/');
var linkFileArr = linkPartArr[linkPartArr.length-1].split('.');
var filePartLength = linkFileArr[linkFileArr.length-2].length - 1;
var filePartLength2 = linkFileArr[linkFileArr.length-2].substr(0,filePartLength);
var newFile = filePartLength2+"."+linkFileArr[linkFileArr.length-1];
linkPartArr[linkPartArr.length-1] = newFile;
var newLink = linkPartArr.toString();
newLink = newLink.replace(/,/g,"/");

nImg.src = newLink;
}

onload=init;
onunload=function(){if (winToggle && !largerView.closed){largerView.close()}}

</script>

tns123j
02-12-2007, 04:25 PM
thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum