kungfu71186
04-20-2006, 10:30 PM
Hopefully this makes sense.
Ok, i have a checkbox right now that will turn off and on an image. Now the the image has a tooltip on it too. When i shut the image i want to be able to change the tooltip on another image. So i got this, chkitem is the check box and setitem is the picture id. Now for the tooltips its currently setup as
onmouseover="stm(Text[0],Style[0])"
function setsh(chkitem,setitem){
if(document.getElementById(chkitem).checked == true){
document.getElementById(setitem).style.display = 'block';
}
else if(document.getElementById(chkitem).checked == false){
document.getElementById(setitem).style.display = 'none';
}
}
That is another function that im using for whats in the tooltip and the style of it. I have Text[0] defined as well as style[0].
But say i wanted to change the text to another one for a picture such as.
Picture1 - Text[0],Style[0]
Picture2 - Text[1],Style[0]
Now i shut off picture1 and i want to change picture2 to Text[2],Style[0]
just for testing i tried this.
function setsh(chkitem,setitem){
if(document.getElementById(chkitem).checked == true){
document.getElementById(setitem).style.display = 'block';
}
else if(document.getElementById(chkitem).checked == false){
document.getElementById(setitem).style.display = 'none';
document.getElementById('set2').onmouseover = 'stm(Text[2],Style[0])';
}
}
where set2 is the picture2 id. This does not seem to work for some reason. Anyone know why?
Ok, i have a checkbox right now that will turn off and on an image. Now the the image has a tooltip on it too. When i shut the image i want to be able to change the tooltip on another image. So i got this, chkitem is the check box and setitem is the picture id. Now for the tooltips its currently setup as
onmouseover="stm(Text[0],Style[0])"
function setsh(chkitem,setitem){
if(document.getElementById(chkitem).checked == true){
document.getElementById(setitem).style.display = 'block';
}
else if(document.getElementById(chkitem).checked == false){
document.getElementById(setitem).style.display = 'none';
}
}
That is another function that im using for whats in the tooltip and the style of it. I have Text[0] defined as well as style[0].
But say i wanted to change the text to another one for a picture such as.
Picture1 - Text[0],Style[0]
Picture2 - Text[1],Style[0]
Now i shut off picture1 and i want to change picture2 to Text[2],Style[0]
just for testing i tried this.
function setsh(chkitem,setitem){
if(document.getElementById(chkitem).checked == true){
document.getElementById(setitem).style.display = 'block';
}
else if(document.getElementById(chkitem).checked == false){
document.getElementById(setitem).style.display = 'none';
document.getElementById('set2').onmouseover = 'stm(Text[2],Style[0])';
}
}
where set2 is the picture2 id. This does not seem to work for some reason. Anyone know why?