This is right in my nose but have gotten to clueless land…anyone know how to make one div work one way and the other another way?
Meaning I have a radio button that when I onclick, I get the div that is hidden….but when I want another function to mouseover(on a different place) I want a different div to open? BUt the way I have my script it works fine with the radio by giving the onclick to : view(this);…
If I want a onmouseover so it can open a div what else do I have to define??
[CODE]
function hideDiv(){
tag = document.getElementsByTagName(“div”);
for(x=0;x<tag.length; x++){
if(tag[x].getAttribute(‘id’).indexOf(“pick_”) != -1){
tag[x].style.display = “none”;
}
}
}
function view(id){
ic = document.getElementById(‘pick_’ + id.value);
hideDiv();
ic.style.display = “block”;
}
I done a mouseover like this:
[CODE]
function hideDivs(){
var showHide = document.getElementsByTagName(‘div’)
for(var i=0; i<showHide.length;i++){
showHide[i].style.display = (showHide[i].style.display == ‘block’)? ‘none’:’block’;
}
}
I guess my question is how do I use both?
I tried adding it like this:
[CODE]
function hideDivs(){
var showHide = document.getElementById(‘show’);
for(var i=0; i<showHide.length;i++){
showHide[i].style.display = (showHide[i].style.display == ‘block’)? ‘none’:’block’;
}
}
But no luck …?
Thanks