Active Menu Item

Hi there.
I'm going to be making a site pretty soon with a menu that has the menu items consisting of tabbed images (I might use some jquery script for this instead), but when they are hover, they will change colour giving the typical button effect.
I just wondered, how could I show a different colour when the user is currently on that page.
Does that make sense.?
Thanks,
Craig

Using the Spry framework you would have the following in the head section of your document
<script src="SpryAssets/SpryDOMUtils.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
function InitPage() {
Spry.$$('#MenuBar1 li').forEach(function(node){
     var a=node.getElementsByTagName("a")[0]; // finds all a elements inside the li, but we only want the first so [0]
     if(a.href == window.location){
         Spry.Utils.addClassName(node,"activeMenuItem");
Spry.Utils.addLoadListener(InitPage);
</script>
<style type="text/css">
.activeMenuItem {
     font-weight: bold;
</style>
The above finds the list item with the same href as the URL, then turns the font into bold. Similar code can show a different background colour or a different image.

Similar Messages

  • Manual menu shows two active menu items on one page

    Hi--I'm having an issue where a manually-created menu shows two active menu items on the same page (as if two pages were active at the same time).
    You can see the issue on my test site here:
    http://teknationnewsite.businesscatalyst.com/telecommunications-services.html
    On the left hand menu, even though only the Telecommunications Services page is active, the menu shows an active state for the menu item below it also. How can I fix this? The states look like they are created correctly in the states panel.
    Thanks,
    Jennifer

    Okay, never mind. I am an idiot. It was a linking issue. I can't figure out how to delete this thread, however, so just please ignore.

  • Power user function: cmd+shift+/ not activating menu items in Photoshop

    In Photoshop (Mac OS X), I typically use the pattern type cmd+shift+/ to open the help menu, type the phrase of the menu item I want to use, and then hit enter to activate the selected menu item.
    I just checked Photoshop CC and the enter key does not seem to correctly behave as it should. Instead of activating the selected menu item, it just dismisses the help menu.
    Is there a way to force the enter key to behave correctly, as it does in other apps?

    It seems to do the same running 14.1.2 on mac os x 10 6.8
    It seemed to work fine before updating from version 14.0

  • OSX help menu search not activating menu items in Photoshop CC

    In Photoshop CS6, about 200 times a day I'd hit Command+Shift+/ to bring up the Help menu focused on the search field, just like I do in all of my apps. I'd type a couple letters from a menu item somewhere in the giant tangle of menu options, down arrow to the match, and hit Enter to action it.
    I can still do this in Illustrator CC (and everywhere), but it's gone in Photoshop CC – it all works up to hitting Enter, which just closes the menu without actioning anything.
    This is so much faster than mousing through the menu, so much more centralized and extensible than keyboard shortcuts. I miss it.
    Here's a quick, dumb screencast showing how this works in Chrome (or any app), but not in PS CC: http://f.cl.ly/items/1p273r0h3k3w202w3m00/screencast.mov
    I've contacted Adobe twice, on Photoshop.com (1) and on their support forums (2), and their engineer, Chris Cox, is drawing a line in the sand. He says their team hasn't done anything to provoke this bug, and that it's an Apple issue. Further, he says he can't (or he won't) deal with Apple's engineering directly, and that we users should do so through these forums. So, here's my swing.
    (1) http://feedback.photoshop.com/photoshop_family/topics/bring_back_osx_help_menu_s earch_support_in_photoshop_cc
    (2) http://forums.adobe.com/message/6145901#6145901

    Naw, I got nothing, I didn't even have a search field. Like, empty space, nothing to be found... HOWEVER. I reinstalled PS CC and got the search field back, then changed my shortcut to ⌘⇧+ system wide, and bam.. it worked.
    I'm happy.
    Greetings also from our mutual friend C. Cox from Adobe... Yeah, that's me.

  • How to active menu item by press Alt key

    Hi everyone,
    I don't know how can i active jmenu bar by pressing Alt key first, and press another key ( for exp. press 'F' go to File menu), they are not at the same by holding Alt key.
    Thanks for help in advance.

    I still didn't get it, would you like give me some details.
    How do i make the ALT key select it (but not open it).
    By pressing the "F' key, the "File "menu selected should be opened.

  • A top level menu item should display its active state if any of its submenu items are active

    Example case: I'm designing a Muse site which is basically a portfolio of our work. We design books, doing page layout and covers. We have numerous book categories and sub categories which I put in a horizontal menu. When a given top level category menu item doesn't have a submenu, it is a hyperlink and it displays active state when the browser displays its linked page. But when a given page is displayed from a submenu link, its top level menu item does NOT display active state. I think it should.
    For example, we have a "Nostalgia" category which has "Film" and "TV" subcategories. Because the menu item, "Nostalgia" has a submenu containing "Film" and "TV", the label "Nostalgia" is not a hyperlink. The submenu attached to it has the two hyperlinked items "Film" and "TV". When the browser is displaying either linked page, the submenu is hidden. So it would be nice if the top level item, "Nostalgia" would display in an active state.

    Hello Daniel,
    As of now this feature is not there in Adobe Muse.
    I would suggest you to please log this as a feature request in our "Ideas for features in Adobe Muse" section. (http://forums.adobe.com/community/muse/ideas)
    Hope this helps.
    Regards,
    Sachin

  • Menu item moves in active state

    I'm using the "Right Icon" to implement a long vertical seperator between menu items:
    laurensilverceramics.businesscatalyst.com
    I've deleted the Rollover, Mouse-Down and Active states of the menu items.  But when a menu item becomes active - it move put by 20 pixels or so.  Any idea on how I can fix this?

    Hi Ryan,
    From looking at the navigation on the site and the corresponding code, it seems you are using a Composition Widget rather than a Menu Widget. The code generated for the Industries link is different than the others as if in its case, the link was applied to chunks of text/content inside the trigger rather than the trigger itself. Recreating that particular item in the composition and applying link just like others should apparently fix this. I would appreciate if you could send your current .muse file to [email protected] along with a reference to this forum thread and mark it to my attention in the Subject? If the file is larger than 20MB, please use an online file sharing service such as WeTransfer or YouSendIt.
    Cheers,
    Vikas

  • JavaScript:  How do you pass the currently active doc to a dialog in a menu item?

    I'm using Adobe Acrobat 11.0 Standard on Windows 7, and I'm having trouble with the menu item that I'm creating.  The menu item calls a dialog that prompts the user to select a page in the currently active document.  The problem is, I can't figure out how to pass the currently active document to the dialog.  I scoured the rest of the documentation, did searches on Google and here in the Adobe forums, but haven't turned anything up.  The AcroJS API gives the following solution (found under app/methods/execDialog):
    This function attaches the Doc object to the dialog box, then passes the dialog box to the app.execDialog method. The dialog4 object and this function can be at the document level.
       function dotheDialog(dialog,doc)
            dialog.doc = doc;
            var retn = app.execDialog( dialog )
    Finally, the following script can be executed from a mouse-up action, for example.
        dotheDialog( dialog4, this );
    I did this exact thing, but in the dialog, the value of this.numPages still comes out as undefined, indicating that the current document still hasn't been passed.  My own code looks like this:
      function dotheDialog(dialog, thisDoc){
        dialog.doc = thisDoc;
        var retn = app.execDialog(dialog);
      app.addMenuItem({
        cName: "Test Dialogue Box",
        cParent: "Edit",
        cExec: "dotheDialog(templateDialogue, this);"
    where templateDialogue is the name of my own dialog, rather than dialog4.  I'm not sure what the retn variable that they declare in the documentation is for, but I've tried it with and without that part, and it doesn't seem to make a difference.  Does anyone know how to do this?

    Sorry, here it is.  It's also just a small modification of something directly from the API, which is why it still has the date bit in it.
    var templateDialogue = {
      initialize: function (dialog) {
        // Create a static text containing the current date.
        var todayDate = dialog.store()["date"];
        todayDate = "Date: " + util.printd("mmmm dd, yyyy", new Date());
        dialog.load({ "date": todayDate });
      commit:function (dialog) {    // called when OK pressed
        var results = dialog.store();
        var inBounds = (parseInt(results["tPag"]) < this.numPages);
        if(!inBounds){
          app.alert({
            cMsg: "Please enter a valid number for the page from which to make the template." +
            "\n" + parseInt(results['tPag']) + " = parseInt(results['tPag']) !< this.numPages = " +  // I put this in to see the value of this.numPages,
            this.numPages,                                                                           // and it continues to be undefined.
            cTitle: "Page out of Bounds",
            nIcon: 0, nType: 0
        }else{
          var nButton = app.alert({
            cMsg: "Your template is named " + results["tNam"] + " and is made from page " + results["tPag"],
            cTitle: "javascript",
            nIcon: 3, cType: 0
      description:    {
        name: "Personal Data",    // Dialog box title
        align_children: "align_left",
        width: 350,
        height: 200,
        elements:
            type: "cluster",
            name: "Add a page to this documents templates.",
            align_children: "align_left",
            elements:
                type: "view",
                align_children: "align_row",
                elements:
                    type: "static_text",
                    name: "Template Name: "
                    item_id: "tNam",
                    type: "edit_text",
                    alignment: "align_fill",
                    width: 300,
                    height: 20
                type: "view",
                align_children: "align_row",
                elements:
                    type: "static_text",
                    name: "Generating Page: "
                    item_id: "tPag",
                    type: "edit_text",
                    alignment: "align_fill",
                    width: 300,
                    height: 20
                type: "static_text",
                name: "Date: ",
                char_width: 25,
                item_id: "date"
            alignment: "align_right",
            type: "ok_cancel",
            ok_name: "Ok",
            cancel_name: "Cancel"
    Side Question:  Out of curiosity, how would you abort if the user clicks cancel?  I get the feeling that they don't cover it because it's something you're supposed to already know how to do, but...I don't.  Would you just put whatever action you want to take into an if ( button == "Ok" ) type statement so that cancel does nothing?

  • "Always Available off line" menu item not available for user on computer where another does see it. This is on Active Directory Computer

    I have a lap top that I want to add files via Always available off line.
    When I logon and right click on a folder share I can see the menu item all was available offline.  When the user logs on this option is not available.  I have turned the feature on and off, rebooted, I have deleted the cache folder but I cannot
    see how to get this menu item to show up.  It's odd that it shows up for one user but not another on the same computer.  I have searched the web and tried the above things and others but cannot seem to resolve this problem.  It seems pretty
    common and their. This computer is on a domain.
    thanks.

    Hi,
    So as we edited the group policy settings in the default domain policy, the menu item is now available?
    And as we are in a domain environment and the settings is configured under the default domain policy, how the domain users behave different from each other? Which someone could see and the other not?
    Could we please generate a
    GPO report to take a check?
    And regarding group policy issue, it is recommended to seek help in the group policy forum, experts there may share some insights:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverGP
    Best regards
    Michael Shao
    TechNet Community Support

  • How to un-checked the sub-menu items in the active document?

    Can anybody let me know, how to make the "checked" sub-menu items in "Window" menu to "un-checked" through scripting. More clearly, i need to open a document alone without showing the tools bars, Document info, etc. Kindly help me the possiblities via scripting(vbscript / javascript). I am using illustrator cs3.
    Thanks...

    With vb you could call an action that changes the workspace. I do this with AppleScript but its only any use for in-house stuff where I know the actions and workspaces are saved.

  • Menu items activation

    hello,
    in my menu i have created all the file operations as a submenus such as new,open,save,save as,page setup,import and extract,print,close andalso i created edit menu which has cut,copy,paste,clear.
    so now i want to activate that menu items,so i need coding to do that,
    pla reply as early as possible.

    Hi
    use
    set_menu_item_property
    (<menu_name.itemname>,enabled,<property_true/property_false>)
    From
    Chirag Patel

  • How can I change the state of a runtime menu item programati​cally?

    Using LabView 6.1, I would like to change the state of the runtime menu item "Operate/Print at completion".
    The goal here is to print the VI front panel according to the operator choice (OK ->print, Cancel ->don't print)
    In a first release, I put a Stop function at the dialog output (activated by the cancel button) but this function stop the complete application and my idea where to stop only the VI in which the dialog is running.
    In a second release, I've tried to use the "Application
    control/Menu" but I receive every time an error:
    Error 88 occured at Cannot modify application menu item in the printtest.vi.
    Possible reasons: LabView, Runtime menu error...
    Any suggestion is appreciated.
    Re
    gards,
    phidu

    Instead of using the print at completion option, print the VI programatically if the user selects to print...open a reference to the VI you want to print and use an invoke node to print vi to printer.
    Alternatively create another VI with a layout optimized for printout, set it to print at completion and run and load the data into that VI if and only if the user OKs the print...
    Mads
    MTO

  • Crystal Report menu-item not visible on SAP menu of client

    SAP 2007A SP:00 PL:38
    Crystal Report 2008 (on start menu)
    Crystal Report 2.0.0.6
    1. Installed CR 2008 on server and it runs fine both from Start menu and from within SAP menu. SAP also shows Crystal Reports menu item and Crystal Admin.
    2. Installed Crystal Report on one of the clients and it works fine in same way.
    3. On 2nd client, SAP Crystal Runtime installed as follows: SAPCrystalSetup.exe run first, then DotNetFramework3.5  run - it resulted in "Setup error". Then run the CRRuntime_12_0_mlb.exe without errors. Then installed CR designer, On this client, Crystal Reports 2008 opens fine from Start menu. However from within SAP, it does not show Crystal Reports Admin nor the Crystal Reports menu-item.
    a) This user has "automatic" start of Crystal Reports 2.0.0.6 in Add-on Administration.
    b) However, in Add-on Manager, Crystal Report does not show at all.
    c) In Add-Remove programs, I see that Microsoft .Net Framework 3.5 SP1 exists on the client.
    d) OS is Microsoft XP.
    How could I see Crystal Administration or 'Crystal Reports' menu-item from within SAP on this client?
    Thanks, Ajay Audich

    Hi,
    1) On Add-Remove Programs on the client, I see the following:
    Crystal Reports 2008 Runtime
    Crystal Reports Basic 2008 for SAP Business One
    Microsoft.NET Framework 1
    Microsoft.NET Framework 2.0 Service Pack 2
    Microsoft.NET Framework 3.0 Service Pack 2
    Microsoft.NET Framework 3.5 SP1
    SAP Business One Crystal Reports 2.0.0.6
    2) The settings are:
    Company Preferences for Crystal Reports for SAP Business One / Version 2.0.0.6/ Default Group Automatic/ Active Yes
    User Preferences Tab-User RT-Preference is set to Default.
    On server, 'Installed Add-ons' tab shows Crystal Status as 'Connected'
    However, on the client, Add-on manager, both "Installed Add-ons" as well as "Pending Add-ons" tabs do not show Crystal Reports row at all.
    3) The user RT on the client is a super-user.
    Thanks.

  • New Menu Item entry in Standard Help Menu

    Hi experts,
    I have added a custom menu item under the standard Help menu of SAP using SE41 (Menu Painter) with pragram name: MENUSYST and status: MEN
    I added the new entry and gave it a function code and activated the function code as well as the interface MENUSYST.
    This worked fine and the entry is visible at the desired location. Now on click of this new entry, I need to open a URL. I had a look at the HELP_START function module but modifying that to call the URL on click of the new menu item, would require an access key.
    Is there any other method available to accomplish the task?
    Regards,
    Reema.

    Hello,
    Basically I need to open a Custom Web Dynpro Application that I have created. Also I need to pass the trannsaction code as a parameter in the URL of the WDABAP Application.
    Pl help me proceed.
    Regards,
    Reema.

  • Missing menu item attachment list in GOS regarding purchase order

    Hello All,
    I customized the archiving for different kinds of documents.
    There is all quite good for example with sales orders or invoices. I can call the transaction codes to view a speacial document - in those cases VA03 / VF03 - , click on the special GOS-icon and select from the drop-down menu the attachment list. The attachment list opens as a popup and there I see all created PDF documents.
    Only with purchase orders it won't work. Calling the ME23N and clicking on the GOS-icon the menu item attachment list is not active (light grey). With administration transaction OAAD I can see that there are archived PDF documents. So, the archiving works but still not the viewing of archived purchase orders.
    How can I activate the attachment list in this case? Maybe I forgot to do something?
    Thank you very much for your help!

    Hi,
    Check if note 1506581 is present in your system,if not please implement the same.
    Also check if in /SPRO -> IMG Customizing -> "Integration with
    our mysap.com components" -> Supplier Relationship Management ->
    Message Control -> "Activate Document Transfer"
    the customizing is correctly set for BUS2012 (Purchase Order).
    If not, please maintain this entry correctly and re-test the
    scenario.
    Regards,
    Ashwini.

Maybe you are looking for

  • How do I create a project site after I publish a project in Project Server 2013?

    How do I create a project site after I publish a project from project pro 2013 in Project Server 2013? I'm trying to look for an option in the ribbon but haven't found any.  Thanks James T.F

  • Does SAP BO has Idoc structures

    Like SAP R/3, does SAP BO also has Idoc structures to send and receive data from the external system, mainly the production related data. Can some one help me on this. Thanks and Regards Pari

  • Custimizing Synchronizzation???

    Hi all,          can anyone let me know the followin briefly..if possible with simple example 1.What is "Customizing Synchronizing", it's used for ??? 2.1.What is "Customizing Distribution", it's use for?? 3.1.What is "Customizing Scout" , it's use f

  • Problem date format

    Hi Guru's I have a problem with a field coming from a file upload in my internal table wich should be insert in a system table in date format. When i do my test to check if the field has a correct date format I always receive the error: "Valid_to_dat

  • Profilers disabled in my project

    Hi I'm using jdev 10.1.3.0.4. I want to make an execution profile on my application, but the Run->Execution profile <projectname> is disabled aswell as my other profiler menuitems. If I create a new project the menu items are enabled. If have checked