PDA

View Full Version : checking layer visibility


image_designs
09-13-2002, 07:53 PM
hi guys ... i need some help identifying if a layer is visible or not before something is done.

this is the code i constructed on my own...actually i modified it from the original which i posted below.


function drs(text) {
dts(1,text);
}



=================SAMPLE CODE===================
==============================================

function drs(text) {
if document.showimage.document.visibility = "hide" {
dts(1,text);
}
else if document.showimage.document.visibility = "hidden" {
dts(1,text);
}
}
==============================================

i need someone to please point me in the right direction as to wat the problem is with the above code....... i need it to check if a layer is visible and if it is then not to do anything but if it is then do "dts(1,text);"

appreciate the help.

thanks again

umm
09-13-2002, 10:34 PM
well, the first thing you need to decide is which browsers you want a "getVisibility()" function to work in, because the way the visibility property for a layer is accessed will depend, to some degree, on the browser type and version.

It would be helpful if you posted the code for the layers.

image_designs
09-14-2002, 03:08 AM
ok...sorry about the incomplete info...all the file are at this address (http://members.rogers.com/jcalleyne/imagedesigns/home/index.html) (layer X script is in the index.html file) and the javascript for layer Y is here (http://members.rogers.com/jcalleyne/tooltip.zip)

i want to check it in ie(all versions) and ns(all versions)

umm
09-14-2002, 03:59 AM
Your questions should be taken to the dynamic drive forum, since the script came from that site. Alternatively, you can also contact the author of the script (the details are in comments in index.html)

Whatever, your site is not displaying in nn4 so there's a bit of configuration to do. Best talking about it to those I mentioned above because they will obviously understand the script components a lot better than me.


Go to Dynamic Drive

http://www.codingforums.com/forumdisplay.php?s=&forumid=14

image_designs
09-14-2002, 07:52 AM
thanks allot for the help

dysfunctionGazz
09-14-2002, 01:38 PM
thanks a lot thats appreciated!!! ;)

still would like to see some ebooks if anyone has seen/done any good 'uns!!!