![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
When someone gets a url i want to show a layer I like to show images , steak, tomatoe and shark Now here is something i copied from devshed and it ays its a function getur how would i write this? What would i write in the body script I spent so much time trying to find out. This time i got the script and i am halfway there No such thing as 'document.getLayerById'....unless you created a new method. getURL ("javascript:vislayeron('myLayer')")???I don't understand this. Could someone write the entire script and script in the body that i |
|
function getElement(id) { return document.all ? document.all(id) : document.getElementById ? document.getElementById(id) : document.layers ? document.layers[id] : null; } function vislayeron(id) { var el = getElement(id); if (!el) return; if (el.style) el.style.visibility = 'visible'; else if (el.visibility) el.visibility = 'show'; } function vislayeroff(id) { var el = getElement(id); if (!el) return; if (el.style) el.style.visibility = 'hidden'; else if (el.visibility) el.visibility = 'hide'; } Last edited by mrrichardfeder on March 26th, 2002 at 07:44 PM Report this post to a moderator | IP: Logged March 26th, 2002 07:34 PM degsy Senior Member Registered: Nov 2001 Location: Posts: 657 oops, just a typo. document.getLayerById('divname').style.visibility should be document.getElementById('divname').style.visibilit y Report this post to a moderator | IP: Logged March 26th, 2002 07:43 PM CODE-Gobbler Junior Member Registered: Mar 2002 Location: Posts: 27 quote: -------------------------------------------------------------------------- ------ Originally posted by mrrichardfeder getURL ("javascript:vislayeron('myLayer')"); -------------------------------------------------------------------------- ------ See |
![]() |
| Thread Tools | |
| Display Modes | |
| |