div/frames/js help please
- Started
- Last post
- 7 Responses
- versa
i am using the following js to change the visibility of frames
within a multi-framed document:function visTog(obj, visibility) {
if(document.getElementById){
top[obj].style.visibility=
visibility;
return false;
}
}in the links set to trigger the function, i have an onclick handler set as
onclick="visTog('viewLeft','hidd...in IE, in the container page this function works perfect for divs sitting in the main document, and divs nested within iframes inside the main document.......
any ideas why it doesn't work in NS.......i'm sure its just my poor js abilities
thanks
- versa0
awww.......sparker, somone? =(
- dessalles0
um...try using 'style.display' instead of 'style.visibility'
thats just a quick guess. i really have no idea what i'm talking about. good luck.
- versa0
visibility is a parameter of the function, so when i engage the function from onclick in links, i pass the div name and whether or not it should be hidden or visible........does that make sense
still haven't fixed it =(
- dessalles0
i think you misunderstood. what i mean is this:
function visTog(obj, visibility) {
if(document.getElementByI
d){
top[obj].style.display
=
visibility;
return false;
}
}and to my understanding, you can still use the same values for the 'style.display property' as you would assign to the 'style.visibility' property.
sorry if this doesn't help
- versa0
cool, but.......its giving me error
saying that top[...].style is null or not an object, so somehow top. is not the right object to reference the frame that the current document (the one containing the button) is sitting in.........urghh!
- versa0
man, i could use some help overhere *hint hint
- versa0
now that people are awake,
could someone help with this?