JavaScript.CoolDev.Com Support Forums
Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com
| Author |
Message |
hm Guest
|
Posted: Sun Jun 29, 2003 5:08 pm Post subject: show/hide layers |
|
|
I want to use the behavior show/hide layers with this menu! is it possible?
the code below doesnt work.. whats wrong?
{code:"Work",
sub:[
{"itemoff":[21,0]},
{code:"SubItem 1"},
{code:"SubItem 2" , onClick="MM_showHideLayers('pic','','hide','pic1','','show')"},
{code:"SubItem 3"}, |
|
| Back to top |
|
 |
camner
Joined: 05 Jun 2003 Posts: 21
|
Posted: Mon Jun 30, 2003 12:06 am Post subject: |
|
|
My knowledge is a bit thin here, but I THINK that what follows code: must be complete html in double quotes. If that is accurate, then in the following line:
| Code: | | {code:"SubItem 2" , onClick="MM_showHideLayers('pic','','hide','pic1','','show')"} | your problem is that you don't have all the html you want within a single set of double quotes.
So, what happens if you try:
| Code: | | {code:"SubItem 2, onClick=\"MM_showHideLayers('pic','','hide','pic1','','show')\""} |
where the \" serves as an "escape character"? Now everything that follows code: is presented as a single string of html.
I suspect that the good folks who run cooldev have a better solution (and mine may not work at all...) |
|
| Back to top |
|
 |
hm Guest
|
Posted: Mon Jun 30, 2003 9:22 am Post subject: |
|
|
| ok tnx! but i couldnt get it to work with that code either.. :/ |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Jun 30, 2003 2:33 pm Post subject: |
|
|
Well, that's because in my stupidity I didn't give you a full html line. Once more try...
| Code: | | {code:"<a href='SubItem 2', onClick=\"MM_showHideLayers('pic','','hide','pic1','','show')\">"} |
|
|
| Back to top |
|
 |
hm Guest
|
Posted: Mon Jun 30, 2003 2:59 pm Post subject: |
|
|
didnīt work! now the text is gone, and nothing happens when i click the button!
[/img] |
|
| Back to top |
|
 |
camner
Joined: 05 Jun 2003 Posts: 21
|
Posted: Mon Jun 30, 2003 3:35 pm Post subject: |
|
|
| This might be best left to the fine folks at CoolDev...it's obviously over my head. Sorry I couldn't be more helpful. |
|
| Back to top |
|
 |
help! CoolDev ppl? Guest
|
Posted: Mon Jun 30, 2003 5:56 pm Post subject: |
|
|
ok tnx for your time anyway!
yhh i need this fixed today!!! CoolDev ppl, where are you? plz help! |
|
| Back to top |
|
 |
hm Guest
|
Posted: Mon Jun 30, 2003 11:49 pm Post subject: |
|
|
now i got the hide/show layers working with this:
{code:"<url:'SubItem 4', onClick=\"MM_showHideLayers('pic','','hide','pic1','','show')\">"},
but the text on the button is still missing? |
|
| Back to top |
|
 |
Sergey Nosenko Developer
Joined: 19 Jan 2003 Posts: 75
|
Posted: Tue Jul 01, 2003 6:14 pm Post subject: |
|
|
| Code: | ...
{code:"SubItem 2", url:"javascript:MM_showHideLayers('pic','','hide','pic1','','show')"},
... |
|
|
| Back to top |
|
 |
hm Guest
|
Posted: Tue Jul 01, 2003 6:36 pm Post subject: |
|
|
yes it works! superduper tnx!  |
|
| Back to top |
|
 |
|
|