PDA

View Full Version : Omni Slide Menu- menu items



pchigur
01-22-2009, 04:30 PM
1) Script Title: Omni Slide Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/omnislide/index.htm

3) Describe problem: I would like to enable and disable the menu items based on some asp.net session value. Can some body help to handle this issue using Omni Slide Menu.

Am not good at Java Script.

I need to comeplete this ASAP. I appreciate for your time.

Thanks

jscheuer1
01-22-2009, 05:32 PM
I'm not real good at asp - I do know some basics. But assuming you are good enouh at it to do a few simple things, the first thing you would want to do is rename menuItems.js to menuItems.asp so that the server will parse asp language it finds in it. You will also have to change (on your page):


<script src="mmenu.js" type="text/javascript"></script>
<script src="menuItems.js" type="text/javascript">

/***********************************************
* Omni Slide Menu script - John Davenport Scheuer: http://home.comcast.net/~jscheuer1/
* very freely adapted from Dynamic-FX Slide-In Menu (v 6.5) script- by maXimus
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full original source code
***********************************************/

</script>

to:


<script src="mmenu.js" type="text/javascript"></script>
<script src="menuItems.asp" type="text/javascript">

/***********************************************
* Omni Slide Menu script - John Davenport Scheuer: http://home.comcast.net/~jscheuer1/
* very freely adapted from Dynamic-FX Slide-In Menu (v 6.5) script- by maXimus
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full original source code
***********************************************/

</script>

so that the page can find the new file. Once you have that, you can use tokens inside menuItems.asp to have it write out the links in various ways. Here is an example of the concept, I'm not sure if I have the asp part right or not (though I did check the basic If Then syntax):


menuItems:[ // REQUIRED!!
//[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
["Menu"], //create header
["Dynamic Drive", "<% If SomeValue = "whtever" Then Response.Write("http://www.dynamicdrive.com") Else Response.Write("javascript:void(0);") End If %>", ""],
["What's New", "http://www.dynamicdrive.com/new.htm",""],
["What's Hot", "http://www.dynamicdrive.com/hot.htm", ""],
["Message Forum", "http://w . . .

So if a server variable named SomeValue is 'whatever' it will write:

http://www.dynamicdrive.com

and if not:

javascript:void(0);

the first would be an active link, the second would be inactive.