Hiding built-in Menu items in CS3 (JS)

Hi all,
Is there any option through javascript to hide ie. disable built-in menu items in CS3. Here our requirement is to hide the menu items like Hide Attributes, Hide Comments, Hide Processing Instruction in the XML palette. Have to disable in all the places.
Thanks
Vaasu

Thanks,
This helps a bit.
What do I use for "SomeScriptMenuItem".
I have tried...
var myScriptMenuItem3 = myFileMenu.menuItems.add(myScriptAction3, LocationOptions.AFTER, "User...");
var myScriptMenuItem3 = myFileMenu.menuItems.add(myScriptAction3, LocationOptions.AFTER, User);
var myScriptMenuItem3 = myFileMenu.menuItems.add(myScriptAction3, LocationOptions.AFTER, 24);
I want my menu item to appear after "User..." in the file menu.
Thanks

Similar Messages

  • Missing preferences, tool bars, menu items after receiving CS3 file while I have CS2

    I have Indesign CS2. I rec'd a CS3 file not knowing it was CS3. A message appeared as follows:
    Cannot Open. Please upgrade your plugins to the latest versions, or upgrade to the latest edition of Indesign.
    I went into HELP, Configure plugins. Chose "all" and "required" plugins. I then clicked ok and it said "All plugins available when you restart application" and it still wouldn't open. Then I was sent an exchange version of the same file and it still wouldn't open. I received this message:
    Cannot open. InDesign may not support the file format, a plug-in that supports the file format may be missing or the file may be open in another application.
    After this I wasn't able to get my CS2 screen back the way it was before. There's no introduction when I open the program, my tool bars aren't present, and the menu items aren't as extensive as they were before.
    It was then suggested I reinstall Cs2. I logged in under the administrator. CS2 was different than the way I had it before but the tool bars were present. I then logged in under my name and there are still problems;no tool bars, missing menu items, no intro, etc.
    I then tried rebuilding my preferences using these instructions;
    The fastest way to do this for InDesign CS2 (and any CS2 program) is to quit the program, then hold down Command-Option-Shift-Control immediately after starting it up again, and keep those keys held down. (On Windows, hold down Control-Alt-Shift.)
    If you mashed on those keys quickly enough, youll get an alert when the splash screen appears offering to Delete InDesign Preferences File?. Click Yes, but dont release the modifier keys while you do so, because youre going to get a second alert to which you should also click Yes.
    Now you can release the keys and InDesign will complete the boot-up process with fresh, clean Preferences.
    Nothing happened so my program is still missing preferences, menu items and toolbars. Any help would be greatly appreciated.
    Thanks
    Operating System Windows XP Professional
    Dell Precision 360

    First, you need to realize that resetting preferences will put them back to ground zero, not the way they were the last time you were happy.
    You can try the key combination again and see if you are any faster (we're talking near instantaneous) or you can open your user profile, show hidden files and folders and navigate to C:\Documents and Settings\Administrator\Application Data\Adobe\InDesign\Version 4.0 and rename the two files InDesign Defaults and InDesign SavedData.
    In your case, a better first option, I think, would be to try System Restore which you'll find in System Tools under the Programs > Accessories heading on the start menu. Go back to the first restore point before you tried to open the file, if you can.
    In any case, for you to open a CS3 .inx file you will need to be fully patched the the last CS2 update, and you should expect to see some text reflow issues, as well as missing any CS3 features that the author used which aren't supported in CS2.
    Peter

  • Is it possible to add a custom menu item to built-in apps like addressbook, safari etc in iPhone

    Is it possible to add a custom menu item to built-in apps like addressbook, safari etc in iPhone

    Apple expects the OS to remain constant for all users - helps to maintain a quality experience. Devs are not allowed to make changes to built-in apps.

  • Form Builder 6 -- built-in delete menu item

    Hi all,
    The built-in delete menu item doesn't ask for confirmation whether we wanted to delete the record or not.
    Can anyone here tell me how to add in the confirmation (e.g. Are you sure to delete?) before deleting the record?
    Thanks in advance.
    Regards,
    Vivian

    You can use Key-DELREC trigger. More you can read in the Forms on-line help DO_KEY built-in.
    Helena

  • How to assign script to menu item? (JS, CS3)

    Hi All,
    I can't find out how to assign a script to a menu item. Instead of clicking a script name in the script panel, I want to appear a menu item in the menu bar. When I click that name on the menu bar I want a certain script to run.
    I've managed to put the menu item in the menu bar, but not to assign the script to it.
    many thanks
    marco

    Hi Marco,
    Here is an example:
    #targetengine "kasyan"
    var myScript1 = new File(app.filePath + "/Scripts/Scripts Panel/Preflight CS3 v3.2.jsx");
    var myScriptAction1 = app.scriptMenuActions.add("Preflight Document");
    var myEventListener1 = myScriptAction1.eventListeners.add("onInvoke", myScript1, false);
    var myScript2 = new File(app.filePath + "/Scripts/Scripts Panel/Rename Sections v3.1.jsx");
    var myScriptAction2 = app.scriptMenuActions.add("Rename Sections");
    var myEventListener2 = myScriptAction2.eventListeners.add("onInvoke", myScript2, false);
    var myScript3 = new File(app.filePath + "/Scripts/Scripts Panel/Check 100 3 SE.scpt");
    var myScriptAction3 = app.scriptMenuActions.add("Check Resolutuon of Images");
    var myEventListener3 = myScriptAction3.eventListeners.add("onInvoke", myScript3, false);
    var myScript4 = new File(app.filePath + "/Scripts/Scripts Panel/Resize Images v16.1.scpt");
    var myScriptAction4 = app.scriptMenuActions.add("Resize Images");
    var myEventListener4 = myScriptAction4.eventListeners.add("onInvoke", myScript4, false);
    try{
    var myScriptMenu = app.menus.item("$ID/Main").submenus.item("Scripts");
    myScriptMenu.title;
    catch (myError){
    var myScriptMenu = app.menus.item("$ID/Main").submenus.add("Scripts");
    var myScriptMenuItem1 = myScriptMenu.menuItems.add(myScriptAction1);
    var myScriptMenuItem3 = myScriptMenu.menuItems.add(myScriptAction3);
    var myMenuSeparator1 = myScriptMenu.menuSeparators.add();
    var myScriptMenuItem2 = myScriptMenu.menuItems.add(myScriptAction2);
    var myScriptMenuItem4 = myScriptMenu.menuItems.add(myScriptAction4);
    Kasyan

  • Adding menu items and making system calls in AfterEffects (AE,CS3)

    We are looking to do the following things via javascript in AfterEffects CS3. It does seem straight-forward, but am unable to find a good reference or example.
    * Add at startup a menu item under "File" (or similar main menu) and have it call a script function when clicked.
    * Have a script make an external system call (to launch an external application/executable with a few parameters)
    Any insights on how to achieve this?
    Many thanks!

    I wanted to see if there was any update on this, I'm writing a series of tools and would love to create a custom menu for quick and easy access.
    If it turns out there isn't an "easy" way to do this (env variables, special directory locations, javascripts) would anyone know if access to the menubar is possible from the Plugin API?
    I'm fairly new to After Effects, just getting up-to-speed on the environment now... seeing if I can duplicate the functionality of some old Nuke scripts in AE.
    thanks,
    Rick_

  • Why the "Work Orders" Menu Item is hided in 2005 Edtion?

    David:
      Thank you!
      The "Work Orders" menu item in 2004 edtion is must useful, But it be hided in 2005,Why ?
      and whether can I show it and use it?
      help me, please!
      thank you!

    Fu
    in the SAP help the following is written:
    Work Order Window
    Definition
    The Work Order Window, from earlier versions of SAPBusiness One, has been replaced by the Production Oder. However, if you had open Work Orders when upgrading, the old Work Orders can still be viewed.
    When a Production Order is open, click on the base document icon  on the toolbar to display the Work Order on which it is based.
    i recommend you to use F1 in your sbo client
    and search for "work orders"
    than select title "Work Order Window" and there is everything in Detail !
    regards
    David

  • Hiding ECB menu items

    Hello,
    I would like to hide menu items in the Edit Control Block Menu, such as publish/unpublish. I'm using SharePoint 2013, and have have tried to use jquery but don't find the element to use it on. Or is there another way to accomplish this? Have searched on
    Google for hours but don't find anthing useful. 
    //Kjell

    There's no good way of doing this as fas as I know. We've implemented a kind of hacking solution for our project. SharePoint calls a method 'BuildMenu' from core.js file to build
    the ECB menu. We've done the followings:
    We've copied the same method in our own custom js file and added our hiding logic at the end of the method
    Then the custom js file is referenced in our mater page (after core.js, to ensure our method is inserted last in DOM overriding SharePoint one)
    The code will looking like below:
    function BuildMenu(ctxt) {
    var m = CMenu(currentItemID + "_menu");
    if (m == null)
    return null;
    else if (Boolean(ctxt.isVersions))
    AddVersionMenuItems(m, ctxt);
    else if (ctxt.listTemplate == 121)
    AddSolutionsCatalogMenuItems(m, ctxt);
    else if (ctxt.listBaseType == 1)
    AddDocLibMenuItems(m, ctxt);
    else if (ctxt.listTemplate == 200)
    AddMeetingMenuItems(m, ctxt);
    else
    AddListMenuItems(m, ctxt);
    InsertFeatureMenuItems(m, ctxt);
    //our custom code to hide menu item
    for (var i = 0; i < m.childNodes.length; i++) {
    if (m.childNodes[i].attributes["text"] != null) {
    if (m.childNodes[i].attributes["text"].value=='Menu title to hide') {
    m.childNodes[i].style.display = 'none';
    return m;
    SP.SOD.notifyEventAndExecuteWaitingJobs("CleanupContextMenu", [m, ctxt]);
    return m;
    I agree this is hacking, but there's no other way we've found.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • Why am I getting Run-time menu error (Error 88 occurred at One or more illegal menu item index in...) in my built applicatio​n (single .exe) , but don't get any error when running/de​bugging it?

    I am using LabVIEW 6.02 & also downloaded the application builder patch. For my runtime menus, I've a subVI that first calls "Delete Menu Items.vi" to get rid of the standard menu items and then "Insert Menu Items.vi" to add my own. I only get an error when I try to run the built application.

    There was a similar issue in LabVIEW 5.0 where you would get the error if you passed an empty array to the 'items' input of Delete Menu Items. This was corrected in version 5.0.1. Did you mass compile your VI's after upgrading to version 6.0.2?
    I tried to reproduce the problem in a small VI but was not successful. I can run an executable built from this example without any problems. I am attaching it for you to test.
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect
    Attachments:
    menu.llb ‏33 KB

  • [JS CS3] Why is menu item greyed out?

    Hello,
    I have the following script that works fine on both my Mac and PC. However, I have sent it two other people and both report the same problem that the menu item shows up in the menus but all the options are greyed out.
    I thought it might be a problem of the path but when I deliberately make a wrong path on my computer I get an error message telling me the path does not exist. The two other people get no such message so there may be another problem.
    Tom
    #targetengine session
    if(File.fs == "Windows"){
        var englishCheck = new File( "~/AppData/Roaming/Adobe/InDesign/Version%205.0/Scripts/Scripts%20Panel/Format/formatChec kEnglish.jsx");
        }//end if
    else{
        var englishCheck = new File( "~/Library/Preferences/Adobe%20InDesign/Version%205.0/Scripts/Scripts%20Panel/Format/form atCheckEnglish.jsx");   
    }//end else
    var englishCheckMenu = app.scriptMenuActions.add("Main-English");
    englishCheckMenu.eventListeners.add("onInvoke", englishCheck, false);
    var frenchCheckMenu = app.scriptMenuActions.add("Main-French");
    frenchCheckMenu.eventListeners.add("onInvoke", underConstruct, false);
    var spanishCheckMenu = app.scriptMenuActions.add("Main-Spanish");
    spanishCheckMenu.eventListeners.add("onInvoke", underConstruct, false);
    //following creates menu if it does not exist
    try{
        var scriptMenu = app.menus.item("$ID/Main").submenus.item("PPcheck");
        scriptMenu.title;
    catch (e){
        var scriptMenu = app.menus.item("$ID/Main").submenus.add("PPcheck");
    //following adds sub menu items
    scriptMenu.menuItems.add(englishCheckMenu);
    scriptMenu.menuItems.add(frenchCheckMenu);
    scriptMenu.menuItems.add(spanishCheckMenu);
    //****functions******
    function underConstruct(){
        alert("The French and Spanish semi-automatic checkers are still under construction.");

    sorry for the late reply.. just saw your qn in 2 years time.. ;p
    you need to set "Enable Attached Scripts" to check in the Edit>Preferences>General.
    hope that helps 

  • CS3 - Scripts Menu item greyed out after using file info

    This looks like a bug to me, anyone else had the same problem ? Or solutions
    I have a couple of scripts which add an extra menu item called "Scripts" on the menu bar (and sub-menu items to call the scripts). If I open the 'file info' for a selected file and then close it again (doesn't matter if it is cancel or okay) the "Scripts" menu item is now greyed out and not accessible.
    Only cure is to shut down and restart bridge - very annoying.
    Bridge v 2.1.1.9 on Win XP SP2.
    Steve

    sorry for the late reply.. just saw your qn in 2 years time.. ;p
    you need to set "Enable Attached Scripts" to check in the Edit>Preferences>General.
    hope that helps 

  • Start Menu items/shotcuts and Start Menu search ability on multiple workstations

    2/13/2014 our IT department began to receive complaints of missing programs. After investigation of a few users we were able to determine that the programs existed but all shortcuts and items from the start menu had been completely removed. In addition the
    searching feature of the start menu was not functional. This happened to about 90% of our environment and the catalyst seemed to be Windows updates or at least occurred after the auto reboot initiated by Windows Updates.  The only items visible in start
    menu were items added after the fact, internet explorer, magnifier, command prompt, and notepad. All other items, folders, and the ability to search installed programs or folders were completely removed. However all programs are present in the program files
    folders. THe start menu folder in program data was empty except for the aforementioned items. Additionally properties of start menu had all necessary checks in boxes such as search program files and folders etc. Also show hidden items and folders is enabled
    for many users so the items were not hidden but gone. And the biggest kicker of all was after a full domain investigation into the issues we found that the majority of our windows server platforms, primarily 2008, were also affected and system restore is unavailable.
    This conflicts with our idea that Windows Updates caused this since our servers get their updates on a manual initiated basis by their admins which we have not performed as of yet for this month. This caused me to begin looking at SCCM SCEP as all systems
    have System Center Endpoint Protection and received definition updates. Also accessing different user profiles or even a new profile did not make a difference, issue still present.
    Due to the enormous inconvenience we sent out a company wide email asking users to perform system restores to get us in a stable state. A system restore to the day before Windows updates (second Wednesday of every month configured by SCCM SCUP) restored
    the start menu items.
    On a multitude of machines IT performed troubleshooting and system restores recording the changes removed and added. We then, on a healthy machine, started to apply the windows updates and SCEP (antivirus) definitions 1 by 1 with out success of replicating
    the issue. Next we performed a system wide antivirus full scan and did not find any viruses. This is obviously not a system criticle issue bringing us down but is a huge concern for us in IT as it happened company wide and caused a large flux of tickets and
    some down time for non-technical users. We most definitely want to know the cause and after several days of investigation and troubleshooting Im turning to the Microsoft community for help.
    I know I categorized this as a Windows 7 issue and its affecting windows server 2008, 2003, and 7, but I did not see a forum for all windows platforms. Since the majority of affected users are Windows 7 I opened it here.
    So to summarize in a bulleted format:
    Issue: Wide spread issue affecting around 60-70 users and servers, all profiles, were all start menu items save one or two system defaults were removed. Additionally the searching feature for the start menu looks to be broken as programs
    exist in program files and are unsearchable from start menu. IT was also affected and I remain affected until I find the cause.
    Investigation and Troubleshooting:
    Start menu properties: nothing has changed and search options are enabled.
    Missing items are not hidden, hiding and unhiding does nothing and folder options show hidden files is checked.
    Program data start menu location is indeed empty as well as user app data start menu location
    No group policy's are in place altering start menu items and no group policy changes were made as of recent
    No SCCM packages pushed company wide in last month or pushed individually
    Windows Updates occurred on windows 7 machines only before the issue occurred and computers restarted and the issue surfaced
    System Center Endpoint Protection Antivirus updates and definitions deployed just before the occurrence with windows updates. SCEP def updates happen on all windows boxes to include servers
    Paint.exe was completely missing from system32 folder for some users machines to include my own
    System restore to that morning before restarts or previous day fixes the issue for windows 7 users
    No windows updates were initiated on any servers
    Servers were also affected with windows 7 machines
    About half the users affected had corrupt Microsoft Office 2013 Pro Plus Click to Run installations and for some the system restore did not fix this and we had to re-install office for around 10 users
    SCEP antivirus did not catch any viruses that could cause this, I performed MBAM scans on a handful of machines and didn't find anything either.
    Re-creating start menu shortcuts works
    Happened to two of our companies locations NH and MA, all part of the same domain but different LANS of course. Companies are interconnected by MPLS connection.
    I combed through SCCM to see if anything deployed and found nothing. Currently I have SCUP updates and SCEP updates disabled. I will post a list of Windows Updates that occurred when the issue occurred as well as the SCEP updates. I have read all the threads
    about this types of issues and tried all steps without success. Googling the issue also did not rear results.
    MichaelSpaulding

    Hi,
    I would like to suggest you try these steps to figure out what could be causing this problem.
    1. Run Troubleshooter
    Open the Search and Indexing troubleshooter
    http://windows.microsoft.com/en-US/windows7/Open-the-Search-and-Indexing-troubleshooter
    2. Create a new library and include fewer folders for test purpose. Now search for a file from that folder. See if it works.
    Create a new library
    http://windows.microsoft.com/en-US/windows7/Create-a-new-library
    3. Try to rebuild search indexing. Refer the steps from the following article.
    http://windows.microsoft.com/en-US/windows7/Change-advanced-indexing-options
    Also you may use the System File Checker tool (SFC.exe) to check the issue. The sfc /scannow command scans all protected system files and replaces incorrect versions with correct Microsoft versions.
    How to use the System File Checker tool to troubleshoot missing or corrupted system files on Windows Vista or on Windows 7
    http://support.microsoft.com/kb/929833
    In addition, you may refer to the following Microsoft TechNet article for the Windows Search related Group Policies.
    Group Policy for Windows Search
    http://technet.microsoft.com/en-us/library/cc732491(WS.10).aspx
    Hope it helps.
    Regards,
    Blair Deng
    Blair Deng
    TechNet Community Support

  • Alt+mnemonic key is not working properly for Menu Items

    Assume there are two menus , File Menu with mnemonic Alt+F
    and Save Menu with mnemonic Alt+S. File Menu contains the
    menu items like PageSetup with Mnemonic S. Save menu has
    the menu item Properties with Mnemonic P.
    Pressing Alt+F opens the File Menu which has the menu item
    PageSetup.Pressing S activates the PageSetup menu item.
    Similarly Pressing Alt+S opens the Save Menu which has the
    menu item Properties. Pressing P activates the Properties
    menu item acion. But Pressing Alt+P also activates the
    Properties menu item action(it is not the desired behaviour)
    Pressing Alt+Mnemonic key has to open only the Menus.It
    should not consider the menu items.
    STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
    1.Press Alt+F
    2.File Menu is invoked
    3.Press S
    4. Invokes the menu item action
    5. Press Alt+S
    6. Save menu is invoked
    7. Press P
    8. Invokes the menu item action
    9. Press Alt+P
    10. Invokes the menu item action
    EXPECTED VERSUS ACTUAL BEHAVIOR :
    Pressing of Alt+Mnemonic key invokes the menu and also menu
    item actions. If the same mnemonic is present in the Menu
    it is giving the priority to Menu only.Pressing of Alt key
    alone does not hiding the pull down menu
    Expected Result;
    Pressing of Alt+Mnemonic key has to list out the pull
    down menu only.It should not consider the menu items with
    the same mnemonic. If Alt key alone is pressed the pull
    down menu has to hide.
    REPRODUCIBILITY :
    This bug can be reproduced always.
    ---------- BEGIN SOURCE ----------
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class JavaBug extends JFrame
    public JavaBug()
    // Create menu bar
    JMenuBar menuBar = new JMenuBar(); // Create menu bar
    setJMenuBar(menuBar); // Add menu bar to window
    // Create first option on menuBar
    JMenu m1 = new JMenu("File");
    m1.setMnemonic('F');
    JMenuItem m1o1 = new JMenuItem("PageSetup");
    m1o1.setMnemonic('S');
    m1o1.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    System.out.println("File/PageSetup was selected");
    m1.add(m1o1);
    // Create second option on menuBar
    JMenu m2 = new JMenu("Save");
    m2.setMnemonic('S');
    JMenuItem m2o1 = new JMenuItem("Properties");
    m2o1.setMnemonic('P');
    m2o1.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    System.out.println("Save/Properties was selected");
    m2.add(m2o1);
    menuBar.add(m1);
    menuBar.add(m2);
    this.setTitle("Mnemonic Bugs");
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    setSize(400,250);
    show();
    public static void main(String[] args)
    JavaBug bug = new JavaBug();
    Suggestions welcomed
    punniya

    I tried your code, but didn't get your "bug" using jdk 1.3 on windows 2000 (at my school).
    Kind regards,
    Levi

  • Unable to create Menu Item List Buttons in Forms - Not Working!

    Hi guys,
    I need desperate help since I have been stuck on these for 2 days and I am unable to move forward!!
    I am trying to create a pdf form using Acrobat pro 9 and Adobe LiveCycle Designer ES. Since I am new to this, I have been browsing through numerous sites, forums and tutorials to learn about this. So far, I was able to create the forum with text fields, etc.. I am trying to have a column in my pdf form where the users can simply copy & paste image icons here..I was having difficulty with this already and have done numerous searches in google. In the end, I thought I am better off trying to use the "stamp" tool for this instead of image field. So this is what I did:
    1) I already placed the image icons (that the users will be copying & pasting) on my pdfs so users can simply click on it to select the image.
    2) I added a new bottom to this form which has the short cut to the menu item "copy" function. I labeled this button as 'Copy' and to this button, I added the following javascript for "Mouseup":
    app.execMenuItem("CopyFileToClipboard");
    3) Next I created another button that I called 'paste' and this button executes the "Paste Clipboard Image as Stamp Tool" menu. This button has the following javascript:
    app.execMenuItem("Annots:Tool:StampFromClipboardMenuItem");
    I thought that after doing the above, the user should be able to click on one of the images in the pdf, then click on 'copy' button and in the end click on 'paste' button that will then run an action so user can stamp this copied image to where ever they want in that file. But this is not happening!! I dont why?? Nothing happens when these buttons are clicked. I have made sure that the "Extended features in Adobe Reader..." is enabled and also tried running the above javascripts on my console window to test it and i know that the actual javascript code is not at fault since these functions works when I try the code through the debugger window. But I just cannot figure out why these menu item functions are not working when the buttons I had created are clicked!!! I dont know if what I have done is correct or if there is a easier way to achieve what I am trying to do!! Its a shame there is no simpler way for the end-users to copy and paste images to the columns in the pdf forms.
    please help me understand why the above button are not working....any help will be great!!

    Hi Paul,
    This is further to our email correspondence. I am just pasting your email response here since it may be useful to other newbies like me:
    "Ok here you go ......I had to add the new row via a script object as the new objects are not completely available until the script ends so I cannot resize the new row from teh current script.
    Then when we resize - we have to resize the row, the cells and the image ....we start with all existing subforms then we do it for the new row that was just added.
    Lastly I see that you have a delete row button. This will have to be part of the row otherwise we ill not know which row the user will want to delete .....unless you ask them (which is not good UI design)."
    I was really impressed the way you modified the script so the table height does not change when new rows are added. That did help me in understanding the methods and it will certainly be v useful to me in the future. I have been practicing and getting a hang of LS and I have actually decided to redesigned my form since it appears that trying to have a fixed table height is quite a bit of work each time a row is added, removed or changed, etc... Your advise so far have been v helpful and it has helped me in redesigned the form into a different layout. So far so good...However, I just have a few more clarifications regarding some hurdles I am facing:
    PS: I have emailed you a sample of my new form now so you can have a look at it.
    1) Dynamic Image fields:
    In this form, I have a subform that has a dropdown list and next to this, I have an image field. I want to change the image based on the selection in the dropdown list. I found a few samples and tutorials on this already and I tried 2 different approach for this. One works and the other doesnt.
    Method that works: What I have done here is, I added all the images in the form and have put their presence to invisible. Then using the javascript, I am making the image visible based on the selection in the dropdown list. I found this method somewhere through googling and it works.
    Method that doesnt work: Its similar to the above, but instead of putting all the images in the form, I just inserted 1 image field and then tried to change the url of this dynamic image based on the selection in the drop down list. But this method is not working. I tried inserting this jscript and nothing happens:
    switch (this.rawValue)
    case "1":
    myImages.value.Image.href=http://www.mysiteaddress.com/blah_blah.jpg;
    break;
    case "2":
    myImages.value.Image.href=http://www.mysiteaddress.com/blah_blah2.jpg;
    break;
    The 2nd method does not work. Although I know the method 1 above works and I am currently using it, I am just curious to find out why the 2nd method is not working? Did I get the script wrong or is this feature no longer allowed? I just thought that if the second method works fine, it saves the hassle of putting all the images on the form and then making them hidden. Instead, I just need to put one image field and then dynamically change its image based on the selection. I hope this make sense..please advise..
    2) Changing the background colour of the Dropdown list box:
    I am trying to change the bg colour of the listbox in the dropdown list object (only the listbox bg color and not the whole background color). So, I added the following script to the mouseEnter event and this works:
    var vName = this.somExpression;
    var fieldObj = xfa.resolveNode(vName + ".ui.#choiceList.border.fill.color");
    fieldObj.value = "255,255,225";
    My Problem: The above script works so I dont need to change anything there. But, I also want to add another script to the mouseExit event to change the fill color to its default once the mouse leaves the dropdown lists. Initially, this field has no fill colour and the border fill style is none. The fill color is only added during the mouseEnter event. How do I change the bg color fill back to none during mouseExit after the above script is executed on mouseEnter?
    (NOTE: If you see my form, I have used the above scripts for the dropdown list only in "boxSubform[0]".)
    3) Changing the length of the Dropdown List box:
    I only have about 1.6 inches workspace to add this dropdown list box. However, the length of some lists (list items) in this dropdown list box is actually longer and the remaining part is cut out. So, I added the following script to increase the dropdownlist length and it does not work the way I would have hoped...
    The script I have written so far:
    I added these to the mouseEnter event and it works fine -
    form1.pageSubform.dynamicSubform.Table1.Row1.boxSubform[0].MyDropdown::mouseEnter - (JavaScript, client)
    this.w = "2in";  //this is to to increase the width of the dropdown list
    I added these to the mouseExit event and it works fine too-
    form1.pageSubform.dynamicSubform.Table1.Row1.boxSubform[0].MyDropdown::mouseExit - (JavaScript, client)
    this.w = "1.625in";
    When I tested the form with the above script, this is what happens:
    1) First when you move the mouse over this field, the width increases. Similarly the width decreased when you move away.
    2) So, even if this is clicked, the list box is opened with this 2inch width so thats good.
    3) There are no problems when the mouse is moved over these list items as well. However, this does not look good when the dropdown list item is clicked with its item lists open and then the mouse leaves this area. In this case, as soon as the mouse leaves this area, the mouseExit script runs and hence it makes the drop down list width to shrink eventhough the list items are still open. How do I resolve this? I was thinking about this and I thought the possible way to overcome this is by writing a javascript for the mouseExit event executing something like this:
    if this dropdown list is open,
    then  this.w = "2in";
    else
    this.w = "1.625in";
    I am not sure how to write a jscript for the above?
    (NOTE: If you see my form, I have used the above scripts for the dropdown list in "boxSubform[0]".)
    4) Hiding the alternative row shadowing for hidden columns:
    If you check out my form, you can notice that I have put the "close" button (button to delete table rows) on the left column and I have also put its presence to "Visible (screen only)". The parent table has got the 'alternative row shadow' checked. What I notice here is, when this page is printed, eventhough the first column's presence is set to "Visible (Screen Only)", it still prints the row shadow for this column and it looks bad. How can I fix this? Any help will be great!
    I have already emailed you my new form again so you can have a look.
    Thanks again Paul and I cant thank you enough for your help. I am sooo happy to see such a great support and resources available here since it can be a nightmare for some newbies like me... :-)

  • How to change the default position of context menu item? (C#)

    Hi,
    I have included a calendar context menu item with my Outlook Addin. But by default, its positioned at the last as shown in the picture below:
    I need a way to make it as the fourth item instead of last one. Also, I want set an icon for the same. How can I do that?
    Appreciate if you can give some sample examples.
    Thanks in advance.
    Thanks Prasad

    Hello Prasad,
    The
    Customizing Context Menus in Office 2010 article in MSDN describes the basics.
    You can specify the IdMso value of the built-in control after/before you need to insert your own:
    <button id="MyBtn" label="MyButton" insertBeforeMso="OpenSelectedItems" />
    See
    Office 2013 Help Files: Office Fluent User Interface Control Identifiers 
    for IdMso values.

Maybe you are looking for

  • Upgraded primary line, phone not connected yet, want to use phone on 2nd line instead

    I renewed my primary line (new every 2) and received a Convoy today. My husband doesn't want to use this phone and wants to stick with the Boulder which is the current phone on the primary line. How can I activate the new phone for my secondary line

  • E-mails being sent unintentionally to more than one address

    Some of my e-mails are being received by not only the intended adressee, but also an unintended one. I have not cc'd the second address, and as far as I can see the second adress does not show up anywhere. Is it possible I have done something that is

  • Incorrect "Ordered" quantity in the item master data

    Hello Experts, I have a situation where there are two items we have found that show the incorrect ordered quantity in the item master data. This is in fact the ordered column and the items are not production items. One of the items is showing a negat

  • How to get the source of event?

    Hi All, I have more than 1 hideShowHeaders, and I need to know where the "show" event came from. I just saw that they have something for LOV Events, I hope they have for the other web beans. Anyone knows how? Please help. Thanks!

  • .air files (Air apps) won't install

    Hello everybody. After having successfully installed the latest AIR runtime, I downloaded an .air app and tried to execute it, to no avail. First off, the .air file was not associated with anything, therefore Windows asked me what application I would