JavaScript.CoolDev.Com Support Forums

Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

show/hide layers

 
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu
Author Message
hm
Guest





PostPosted: Sun Jun 29, 2003 5:08 pm    Post subject: show/hide layers Reply with quote

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

PostPosted: Mon Jun 30, 2003 12:06 am    Post subject: Reply with quote

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





PostPosted: Mon Jun 30, 2003 9:22 am    Post subject: Reply with quote

ok tnx! but i couldnt get it to work with that code either.. :/
Back to top
Guest






PostPosted: Mon Jun 30, 2003 2:33 pm    Post subject: Reply with quote

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





PostPosted: Mon Jun 30, 2003 2:59 pm    Post subject: Reply with quote

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

PostPosted: Mon Jun 30, 2003 3:35 pm    Post subject: Reply with quote

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





PostPosted: Mon Jun 30, 2003 5:56 pm    Post subject: Reply with quote

ok tnx for your time anyway! Smile

yhh i need this fixed today!!! CoolDev ppl, where are you? plz help!
Back to top
hm
Guest





PostPosted: Mon Jun 30, 2003 11:49 pm    Post subject: Reply with quote

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

PostPosted: Tue Jul 01, 2003 6:14 pm    Post subject: Reply with quote

Code:
...
{code:"SubItem 2", url:"javascript:MM_showHideLayers('pic','','hide','pic1','','show')"},
...
Back to top
hm
Guest





PostPosted: Tue Jul 01, 2003 6:36 pm    Post subject: Reply with quote

yes it works! superduper tnx! Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu All times are GMT
Page 1 of 1