Results 1 to 28 of 28

Thread: [RESOLVED] Menus

  1. #1

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Resolved [RESOLVED] Menus

    What is the best approach when creating menus? Using Javascript if fine if the browser has it enables or supported. An html table with each row as a menu item is fine and stable but leaves much to be desired.

    Someone have a good solution that is not resource intensice or limited to a particular browser?

    I need it to be as compliant as possible with all browsers as possible.

    Thanks
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  2. #2

  3. #3

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Menus

    So for a nice looking static non javascript menu a table will be good? I think I can use CSS to customize it. That should be widely compatible?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

  5. #5

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Menus

    Errr, more is CSS better compatibility then JavaScript?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Menus

    CSS has nothing to do with jScript.

    CSS styles items on a page.
    JScript adds UI functionality, like menus, roll over images and pop windows etc. completely different to CSS

    Woka

  7. #7

  8. #8

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Menus

    Just something that will look nice and maybe have rollovers? Heck I dont know. I'm not very creative. Surprize me.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  9. #9

  10. #10
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Menus

    Quote Originally Posted by Wokawidget
    Something like attached here.

    Roll overs require Javascript.
    Make ya mind up what u want

    Woka
    Yeah, in the attachment.

  11. #11
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Menus

    Quote Originally Posted by RobDog888
    What is the best approach when creating menus? Using Javascript if fine if the browser has it enables or supported. An html table with each row as a menu item is fine and stable but leaves much to be desired.

    Someone have a good solution that is not resource intensice or limited to a particular browser?

    I need it to be as compliant as possible with all browsers as possible.

    Thanks
    No, you must use CSS, Tables, and Javascript to do it. Search for examples on it, and you can then modify it to suit your needs.

  12. #12

  13. #13

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Menus

    I dont see any attachments.

    Ok, no Js, only html and CSS. I dont know how to search. Someone Gimme Code!

    Since this is in aspx shouldnt it not matter or is that limiting to certain browsers? I'm not sure but if the server is running the framework then shouldnt all be compatible?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  14. #14
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Menus

    I am not sure what you're getting at here

    .NET doesn't allow you to create stuff like this. you MUST use javascript.

    The only "menus" you can create are like what's on the left here:

    www.vbForums.com/usercp.php?

    these would be done using something like:
    Code:
    <table>
    	<tr class="MenuHeader">
    		<td>
    			Forums
    		</td>
    	</tr>
    	<tr class="MenuItem">
    		<td>
    			<asp:HyperLink id="lnkVB6" NavigateUrl="Forum.aspx?ForumID=4" runat="server">Visual Basic 6</asp:HyperLink>
    		</td>
    	</tr>
    	<tr class="MenuItem">
    		<td>
    			<asp:HyperLink id="lnkVBNET" NavigateUrl="Forum.aspx?ForumID=6" runat="server">VB.NET</asp:HyperLink>
    		</td>
    	</tr>
    	<tr class="MenuItem">
    		<td>
    			<asp:HyperLink id="lnkASPNET" NavigateUrl="Forum.aspx?ForumID=42" runat="server">ASP.NET</asp:HyperLink>
    		</td>
    	</tr>
    </table>
    You would then add the following inside the HEAD tag:
    Code:
    <LINK href="Styles/Booking.css" type="text/css" rel="StyleSheet">
    This CSS file will contain the values for MenuHeader and MenuItem.

    This table can be build dynamically using VB.NET in the code behind.

    Woka

  15. #15
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Menus

    all the funky little UI things you see in web pages are all done by javascript. So if your user doesn't allow Jscript that this seriously limits you to what UI functionality you can add.
    Woka

  16. #16

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Menus

    Ok, thanks, but do you know of any good css generators or tutorials?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  17. #17
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Menus

    add a css file to ya project.
    .NET has an in built editior thingy so you can create CSS entries like MenuHeader and Menu item, which will be in the format:
    Code:
    MENUHEADER
    {
      font-family:Verdana, Arial, Helvetica, sans-serif;
      font-size: 10pt; 
      color: #00366;
      font-style: normal; 
      font-weight: normal;
      background-color: #ffffff;
    }
    MENUITEM
    {
      font-family:Verdana, Arial, Helvetica, sans-serif;
      font-size: 8pt; 
      color: #000033;
      font-style: normal; 
      font-weight: normal;
    }
    .NET has intellisence for CSS files too

    Woof

  18. #18

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Menus

    Ya, I found the css sheet in the IDE but unless your very creative its not that easy to creat something that looks professional.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  19. #19
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Menus

    That's where you look at source HTL from other web sites and see what they use for colors, fonts, cellpadding etc, and then create a CSS based on that.
    Will make you one when I get home.

    Woof

  20. #20

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Menus

    What would I do without you BadgerBoi?

    How about some color scheme with Red, Grey, and White.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  21. #21
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: Menus

    Here you do:
    Style sheet:
    Code:
    .MenuTable
    {
    	border-style:solid;
    	border-width: thin;
    	background-color: #4a3c8c;
    }
    
    .MenuHeader
    {
    	font-weight: bold;
    	color: #f7f7f7;
    	border-width: 0px;
    }
    
    .MenuItem
    {
    	color: black;
    	background-color: #dedfde;
    	border-width: 0px;
    }
    and HTML:
    Code:
    <table class="MenuTable">
    	<tr class="MenuHeader">
    		<td>
    			Forums
    		</td>
    	</tr>
    	<tr class="MenuItem">
    		<td>
    			<asp:HyperLink id="lnkVB6" NavigateUrl="Forum.aspx?ForumID=4" runat="server">Visual Basic 6</asp:HyperLink>
    		</td>
    	</tr>
    	<tr class="MenuItem">
    		<td>
    			<asp:HyperLink id="lnkVBNET" NavigateUrl="Forum.aspx?ForumID=6" runat="server">VB.NET</asp:HyperLink>
    		</td>
    	</tr>
    	<tr class="MenuItem">
    		<td>
    			<asp:HyperLink id="lnkASPNET" NavigateUrl="Forum.aspx?ForumID=42" runat="server">ASP.NET</asp:HyperLink>
    		</td>
    	</tr>
    </table>
    Hope that helps.

    Woka

  22. #22

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Menus

    Thanks BadgerBoi. I'm going to check it out in a few. Got to do some stuff first. What about the anchor links mouseover and stuff?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  23. #23

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Menus

    Ok, I can build on that. How about creating a separate A link for the menu that is setarate from the rest of the page's A links?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  24. #24

  25. #25

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Menus

    A = Anchor or link.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  26. #26
    Lively Member {yak}'s Avatar
    Join Date
    Aug 2005
    Posts
    119

    Re: Menus

    I'm not sure, as I've never used the asp hyperlink, but do you mean, how to have the menu's anchor tags have specific colors, different from the rest of the page? If so, you can just specify the class along with the regular anchor stuff:
    PHP Code:
    // using the example provided above
    <html>
    <
    head>
    <
    style type="text/css">
    .
    MenuTable
    {
        
    border-style:solid;
        
    border-widththin;
        
    background-color#4a3c8c;
    }

    .
    MenuHeader
    {
        
    font-weightbold;
        
    color#f7f7f7;
        
    border-width0px;
    }

    .
    MenuItem
    {
        
    colorblack;
        
    background-color#dedfde;
        
    border-width0px;
    }
    .
    MenuItem a.noDecor
    {
        
    text-decorationnone;
        
    colorblack
    }
    .
    MenuItem a:link
    {
        
    colorblack;
    }
    .
    MenuItem a:visited
    {
        
    color#CFDCE6;
    }
    .
    MenuItem a:hover
    {
        
    colorwhite;
    }
    .
    MenuItem a:active
    {
        
    color#CFDCE6;
    }
    </
    style>
    </
    head>
    <
    body>
    <
    table class="MenuTable">
        <
    tr class="MenuHeader">
            <
    td>
                
    Forums
            
    </td>
        </
    tr>
        <
    tr class="MenuItem">
            <
    td>
                <
    a href="Forum.aspx?ForumID=4">Visual Basic 6</a>
            </
    td>
        </
    tr>
        <
    tr class="MenuItem">
            <
    td>
                <
    a href="Forum.aspx?ForumID=6">VB.NET</a>
            </
    td>
        </
    tr>
        <
    tr class="MenuItem">
            <
    td>
                <
    a href="Forum.aspx?ForumID=42">ASP.NET</a>
            </
    td>
        </
    tr>
    </
    table>
    </
    body>
    </
    html
    {yak}

  27. #27

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Menus

    Yup, thats it. Thanks for the quick reply. I guess I owe you twice now.
    I havent done a full website in a long time. Its starting to come back tome now.

    Edit: I suppose I could also change the cells backcolor during a link hover and change it back after giving the cell a rollover effect.
    Last edited by RobDog888; Sep 29th, 2005 at 09:26 PM.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  28. #28
    Lively Member {yak}'s Avatar
    Join Date
    Aug 2005
    Posts
    119

    Re: Menus

    Yep, you got it.
    Quote Originally Posted by RobDog888
    I guess I owe you twice now.
    I'll be taking you up on that sooner than later, JK
    {yak}

Posting Permissions

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



Click Here to Expand Forum to Full Width