js help please
- Started
- Last post
- 6 Responses
- versa
i have an html doc
with a div based layout.in two of the divs i have iframes
i want to use js to execute changing the visibility of one of the frames and then both frames at once, from one button click in one of the frames
to get the visibility of one to change, the code i am using is:
function visTog(obj, visibility) {
if(document.getElementById){
top[obj].style.visibility = visibility;
return false;
}
}then on the button in one of the iframes:
onclick="visTog('viewLeft','hidd...it works in IE but not NS???
any idea why?
any help would be really appreciated - i'm lost with it.
if i can get this working, then i can easily modify it to get both frames to change visibility
thanks
- versa0
this is my third thread try this week -
i've tried so many things to get this to work
someone's gotta know whats up
help me obi one
- sexypixel0
check the code on my site, it is using layers, each link targets two layers and changes the content for each.. using a javascript function... works on both ie and ns and mozila and safari as far as i know
- sexypixel0
function change0()
{
parent.subnav.location="covers.h...
parent.content.location="cover_0...
}
- versa0
similar, and thanks,
but i'm trying to call a div that contains the iframeit actually doesn't matter that there's an iframe in the div at all for this issue
i want to correctly navigate the window objects to find the particular div and make it visible or hidden
got it working in IE, but in NS,
'top [...] is not an object'does that make sense?
- versa0
OMG! help me somebody with some skills :)
- dessalles0
i'll try this again...
here is what i would do. assuming i had a div with an ID of 'vieLeft':
function (id, visibility){
if(...)
document.getElementById(id).styl... = visibility;}
i'm not sure what you're trying to do with your if statement. mail me the code and i'm sure i'll be able to help. but otherwise...this is the best i can do.