Hiding buttons

wxdqz

New Member
I have a button that I want to make conditionaly invisible, rather than disabled.

Here is what I have:

<SCRIPT language="JavaScript1.2" type="text/javascript">


var r=0
var imgno=0
var composite=null

// create the array to load the full size images , thumbnails and composite pages if applicable
var photos = new Array(
new Array("Images/MarH0022V.jpg","Images/MarH0022T.jpg","CP_MarH1.html"),
new Array("Images/NicM0421V.jpg","Images/NicM0421T.jpg",null),
new Array("Images/DouB0296V.jpg","Images/DouB0296T.jpg","CP_DouB1.html"),
new Array("Images/SteP0004V.jpg","Images/SteP0004T.jpg","CP_SteP.html"),
new Array("Images/DiaJ0468V.jpg","Images/DiaJ0468T.jpg","CP_DiaJ.html"),
new Array("Images/JudL0015V.jpg","Images/JudL0015T.jpg",null)
);


// Preload the images
function setImg() {
var imgAry = new Array();
var imgtn = new Array();
// for each row
for(x=0; x<photos.length; x++) {
imgAry[x] = new Image();//full size images
imgtn[x] = new Image();//thumnails
imgAry[x].src = photos[x][0];
imgtn[x].src = photos[x][1];
}



document['bigimg'].src = photos[0][0];
document['tn0'].src = photos[0][1];
document['tn1'].src = photos[1][1];
document['tn2'].src = photos[2][1];
document['tn3'].src = photos[3][1];
document['tn4'].src = photos[4][1];
document['tn5'].src = photos[5][1];
}

function next() {
window.location="TVHS02.html";
}

// image swap function
function Blowup(r) {
document['bigimg'].src = photos[r][0];
imgno=r;
//alert (imgno)

var cpage = photos[r][2]


//function composite(cpage){
alert (cpage)
if (cpage!=null) {
document.getElementByName('comp').style.visibility = 'visible'
}
else {
document.getElementByName('comp').style.visibility = 'hidden'
}}

//}

onload = setImg;

I get an object does not support this property error. I thought this was the standards way
 
Back
Top