Results 1 to 2 of 2

Thread: Omni Slide Menu- menu items

  1. #1
    Join Date
    Jan 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Omni Slide Menu- menu items

    1) Script Title: Omni Slide Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...lide/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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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):

    Code:
    <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:

    Code:
    <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):

    Code:
    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.
    Last edited by jscheuer1; 01-22-2009 at 05:38 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •