I am trying to show and hide layers on a page by clicking on a menu item. See http://tempsite.texwipe.com/layer.asp for a example using javascript.
I would prefer to do it with milonic like the tramline menu. Is it possible and if so how?
Thanks
Show/Hide div layers using menu
Hi,
You can call a function in an aI string. I am not into functions but I can give you a couple of examples so you can see how it's done.
1. This will play a sound when you mouseover an item, in this one it requires that you put a dummy span on the page itself, since that is necessary for the function to work. Put this on an html page.
You can put this function either on the page or at the top of the menu_data.js file. If it's in the file, it will work on any page with the dummy span on it, if it's on the page it will only work on the pages where the function is.
Then in the aI string you call the function like this,
In this case the function will fire on mouseover. If you wanted it to work onclick, you could put in
Here are a couple of demos on the Milonic site, one for putting a new item image based on a date, the other for changing the text of an item based on mouseover.
http://support.milonic.com/demos/timed_ ... /index.htm
http://support.milonic.com/demos/swap_text/index.htm
Hope this will give you some idea how to do it. I tried it, but since I don't know functions I just keep getting an error return something is outside function
Ruth
You can call a function in an aI string. I am not into functions but I can give you a couple of examples so you can see how it's done.
1. This will play a sound when you mouseover an item, in this one it requires that you put a dummy span on the page itself, since that is necessary for the function to work. Put this on an html page.
Code: Select all
<span id=dummyspan></span>
Code: Select all
function DHTMLSound(surl) {
document.getElementById("dummyspan").innerHTML=
"<embed src='"+surl+"' hidden=true autostart=true loop=false>";
}
Code: Select all
aI("text=Home;url=http://milonic.com/;onfunction=DHTMLSound('success.wav');");
Code: Select all
clickfunction=DHTMLSound('success.wave');");
http://support.milonic.com/demos/timed_ ... /index.htm
http://support.milonic.com/demos/swap_text/index.htm
Hope this will give you some idea how to do it. I tried it, but since I don't know functions I just keep getting an error return something is outside function

Ruth