Button check that several drop down menus are not the default submit

Hi all

I create a form that has several drop down menus and add a submit button that checks on Mouseup executes the following code. I need it so that they are not yet on the default value and they chose something different otherwise she will not submit.

Instance field 'UserDepartment' has the value default of ' Select Department: "I added the checked for 3 of the drop down menus far, but no matter what I choose always travels and don't pop up with an alert, even if the default is selected.

What I am doing wrong? I have read several other issues, but for me (no experience), it seems fine.

var v = this.getField("UserDepartment").value;
var v2 = this.getField("UserRole").value;
var v3 = this.getField("ManagerRole").value;
if (v == "Select Department:")
{
    app.alert("You must select a valid department for the new starter before you can submit this form.");
}
else if (v2 == "Select Job Role:")
{
    app.alert("You must select a valid department for the new starter before you can submit this form.");
}
else if (v3 == "Select Job Role:")
{
    app.alert("You must select a valid department for the manager before you can submit this form.");
}
else
{
    submitForm({cURL: "mailto:[email protected]", cSubmitAs: "PDF"});
}



To make it replace the first two lines of your code with this:

var f = this.getField ("UserDepartment");

If (f.valueAsString is f.defaultValue)

If it still does not work, you will need to share the file with us for more

Help.

Monday, March 14, 2016 at 15:26, ryand54430413 [email protected]>

Tags: Acrobat

Similar Questions

  • drop-down menus are not open

    Any program that uses the menu drop-down menus in the program such as outlook will allow not her drown to the bottom of the window to stay open enough long to allow you mouse and choose anything from the drop down. When a window pops up which is happening in a program that any movement with the mouse will make up the pop are also behind the window of the program cause you to minimize all windows to find the context menu.  I should mention that not all drop down have this problem. the bottom of the main fall to the Ribbon do not have the problem.

    Hello

    You did changes to the computer before the show?

    Method 1
    I suggest you perform the clean boot and check if the problem persists. Clean boot will disable all of the third-party program to see if any third-party program is causing the problem. When you perform the clean boot make sure that you also disable all antivirus and firewalls on the computer.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    http://Windows.Microsoft.com/en-us/Windows7/disable-antivirus-software
    Note: Follow step 7 clean boot KB929135 article to reset the computer in normal mode.

    Method 2
    The issue could be due to a virus on the computer. I suggest you run virus scan online by using the Microsoft safety scanner.

    Microsoft safety scanner
    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Note: when you do an antivirus online, you will lose data that are affected by the virus. Microsoft is not responsible for the loss of this data.

  • drop-down menus are not displayed correctly

    When using drop/menu drop-down menus for example: bookmarks, top some elements do not display correctly. If I have the mouse on them appear, but as soon as I move the mouse somewhere else, they disappear again. I don't have the same problem on other applications for example: Internet Explorer.
    I made a Firefox > troubleshooting information > reset Firefox, which made no difference. This used to work OK, I think that has happened since the upgrade to 20.0.1 but cannot be sure.
    I am running Windows XP Version 2002 SP3
    Thank you

    Hello TR6Nick, please try to disable hardware acceleration in firefox > options > advanced > general and see if that will solve the problem...

  • Drop-down menus are black, so that you cannot see your cursor

    original title: drop-down menus

    Why some in the drop down menus are black so that you do not see the command until the cursor is on it.

    Has made the checks for updates, no joy. Changed the theme of windows 7 to the classic, it worked and drop-down menus were visible. Changed back to windows 7, still OK.

  • DW-MX-04 in the drop-down menus do not work.

    I use Dreamweaver MX 2004 (have been for several years, so I know my way around it).  I want to create the menu drop-down or menu ruffles to consolidate the links on the page into categories in order to reduce the number of tabs of link I have on each page.  I was able to create the menu, I needed (using the: Tag Chooser\ Behaviors\ the menu Pop-U), but when I saw the pages in Internet Explorer, the text shows that on the text of mouseover (not on top) despite the text color defined as black in the Menu window.  But it's even worse.  When I downloaded the page to try it, in the drop-down menus appear not at all when I hover over the main buttons and I get javascript errors.

    Can someone give me assistance both on how to solve this problem?

    I checked the issue of text color by using the code editor pane view, and it matches the way I have it set on the Shortcut Menu.  But that's the least of my worries, if I can't get to work at all when the pages are turned.

    Thank you... JEB

    Use the CSS Menus.  Menus MM bearing are horrible.

    Pop-up menu Magic2 by PVII (purchase of DW extension)

    http://www.Projectseven.com/products/menusystems/PMM2/index.htm

    jQuery Superfish

    http://users.TPG.com.au/j_birch/plugins/SUPERFISH/

    CSS3 Dropdown menu

    http://www.red-team-design.com/CSS3-dropdown-menu

    Nancy O.

  • Drop-down menus does not open. Click right box will not appear.

    Hello!

    Yesterday, I was working on the Wix site. I noticed that when I tried to do a right click to copy and paste text box never showed up. I realized then, on other sites, in the drop down menus would not open (as the ones where you select your State, etc.). I can't turn on the bar menu at the top of Firefox with the ALT key, but when I click Tools or anything else, the box does not fall down. Same thing for my bookmarks and menu of frequently used buttons. My right click works fine when I'm not online. I really like to use Firefox and hope that there is a better solution than to switch to a different browser. I use Firefox at work and it's there.

    Please let me know if you need more information.

    Try Firefox Safe mode to see if the problem goes away. Firefox Safe mode is a troubleshooting mode that disables certain parameters, disables most Add-ons (extensions and themes).

    If Firefox is open, you can restart Firefox Safe mode in the Help menu:

    • In Firefox 29,0 and above, click on the menu button

      click Help

      then select restart with disabled modules.

    • In previous versions of Firefox, click on the Firefox button in the upper left of the Firefox window and click help (or click on help in the Menu bar, if you do not have a Firefox button) and click on restart with disabled modules.

    If Firefox is not running, you can start Firefox in Mode safe mode as follows:

    • On Windows: Hold down the SHIFT key when you open the desktop Firefox or shortcut in the start menu.
    • On Mac: Hold the option key during the startup of Firefox.
    • On Linux: Exit Firefox, go to your Terminal and run firefox-safe-mode
      (you may need to specify the installation path of Firefox for example/usr/lib/firefox)

    When the Firefox Safe Mode window appears, select "start mode safe."

    If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to understand that one. Please follow the section Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems to find the cause.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.

  • Adding a voice to several drop down menus with a checkbox.

    Hello!

    Open a new topic because it's a different matter.

    I want to basically do:

    I have three different drop-down menus and check boxes.

    What I want to achieve, is that when the user check a specific box, this specific element is added to all the drop down menus, when the user clear this check box, this specific element is removed from all the drop down menus.

    Thank you for the answers!

    To add an item, you can either use the insertItemAt and setItems method in situ, remove an item, you can use the deleteItemAt or setItems.

  • Drop-down menus are mutually exclusive

    Hi all:

    I am working on a form in which I need to have a user rates four items 1 to 4 compared to the other. Initially, we were going to use 4 drop downs each menu containing four options allowing the user to choose. The problem is, of course, that the user could choose option 1 four times in a row. So I need a way to allow the user to assess these four points 1 to 4, but in a mutually exclusive way. the image below shows the problem (they are in Spanish, but the text is not important). Here point 1 and section 4 have been selected both as 1, which is what we want to avoid. Any suggestions would be greatly appreciated. Thank you.

    4choices.png

    Hello

    You could have a script of the event preOpen all of the four drop-down menus that would set the display settings, based on the previous selections in the other drop-down menus.

    There is an example here to populate the drop-down menus: http://assure.ly/jcTahK.

    Try this in the DropDownList1 preOpen event:

    Remove the previously selected items

    this.deleteItem (DropDownList2.selectedIndex);

    this.deleteItem (DropDownList3.selectedIndex);

    this.deleteItem (DropDownList4.selectedIndex);

    Hope that helps,

    Niall

  • Drop-down menus are flashing but can't make selection

    Windows 7 Professional
    Intel HD Graphics 3000; Corei7
    All the drop down menus with all websites will Flash open, but then close before making a selection
    Following these steps: options > options > advanced > uncheck "use hardware acceleration when available.
    But still does not
    Update driver graphic and run good hope!

    The use of Firefox in version 9.0.1

  • Menu bar 'View' drop-down menus do not work except option 'character encoding '.

    V33.0.1 FF
    For past several updates I asked problems with drop-down menus. 'See' on the Menu bar is an exzmple. Pnly 'Character encoding' option works correctly. Similar problem occurs in many other places including LastPass extension which I use a lot.

    An empty menu appears right without entries. But the problem is not consistent.

    Heals the problem to the menu bar of FF and other questions of FF from FF in safe mode. But I can't find which plugin or extension is causing the problem.

    All ideas

    Hello makatikid, try Disabling graphics hardware acceleration and check again.

    You will have to perhaps restart Firefox for it to take effect, so save any work first (e.g. you compose mail, documents online that you are editing, etc.).

    Then perform the following steps:

    1. Open the Firefox Options window as follows:

      • Click the menu button

        and select Options

    2. In the Options of Firefox window, click the Advanced tab, and then select general.
    3. You will find in the list of parameters, the checkbox use hardware acceleration when available . Clear this check box.
    4. Now restart Firefox and see if the problems persist.

    In addition, please check the updates for your graphics driver by following the steps in the following knowledge base articles:

    In firefox safe mode, hardware acceleration is disable.

    Thank you.

  • Orderfulfilment support portal. Drop-down menus does not. Help please.

    I work in this page

    Open a folder of Service the customer

    Execution of orders Edition teachers and students

    and I can put data in most of the fields, however the drop downs for

    PURCHASING INFORMATION

    Do not have all the options for me to click on. only an empty menu drop-down.

    using the subscription: a browser that allows cookies and pop-up windows, please contact adobe for hourly pst here support and, when available, click on "still need help," http://helpx.adobe.com/x-productkb/global/service-ccm.html

    thank for help: using a browser that allows cookies and pop-up windows, please contact adobe for hourly pst here support and, when available, click on "still need help," https://helpx.adobe.com/contact.html

  • Drop-down menus do not disappear when the mouse

    Screen shot 2013-03-22 at 1.24.59 PM.png

    Created with the composition widget drop-down menus remain on-screen, even after I mouse-out. They remove only cdes the screen if I navigate to another page. This behavior leaves a menu (submenu residential) overlappimg Business submenu as in this picture.

    How can I set the target of a widget to disappear after I deleted the mouse on the trigger?

    If you're going to continue to approach Composition widget, you must select the widget to Composition, and then choose the object command > Move To > Master in the foreground in order to go the top of content to pages, the master page is applied to.

    I'm still confused as to why this isn't just a horizontal menu widget on every page (which reflects the structure of your site in the Plan view and automatically assigns and maintains all the page names and links to menus and submenus) or manual (where you can manually create the complete menu structure set the names of menu items and assign links to each menu item and submenu). The menu widget supports formatting and menu structure you currently have (and automatically requires all the submenus to be above any other content when displayed in a browser).

  • drop-down menus do not work. Need to click several times before drops down.

    This happens mostly with www.linkedin.com.
    The drop down menu works sometimes on the first mouse click; but often it is not, and I have to click several times until it opens the menu. Very aggravating.

    Many issues of the site can be caused by corrupted cookies or cache.

    • Clear the Cache

    How to clear the cache of Firefox {web link}

    and

    • Delete Cookies

    This will be you disconnect all the sites to which you are connected.
    Press < Alt > or < F10 > to display the toolbar.
    Followed;

    Windows; Tools > Options
    Linux; Edit > Preferences
    Mac; name of the application > Preferences

    Then confidentiality.
    Under historical, select Firefox will use the custom settings.
    There is a button on the right side, called View the Cookies.

    If there is still a problem,
    Start Firefox in Safe Mode {web link}
    While you are in safe mode;
    Press < Alt > or < F10 > to display the toolbar.
    Followed;

    Windows; Tools > Options
    Linux; Edit > Preferences
    Mac; name of the application > Preferences

    Then Advanced > General.
    Find and stop using hardware acceleration.

    Dig safe web sites and see if there is still a problem. Then restart.

  • All the drop down menus are broken in Firefox 5.01 on system dual monitor.

    My system specs...

    • Intel Core 2 Quad 9550 clocked at 3.2 GHz
    • 8 GB of OCZ DDR2 6400
    • PNY GTX 460SSC
    • 4 WD Caviar Black SATA HD is a total of 4 TB
    • Blu - ray LG burner
    • Plextor DVD burner
    • 1000W Corsair modular power supply
    • Corsair Obsidian 700 d case

    When Firefox is open on the second monitor (not the one designated as my primary monitor) and I try to open a drop-down list (including folders of bookmarks in the bookmarks bar, the menu options or in the menu bookmark) they twinkle and disappear, leaving the outline of the menu back and allow me to always select something from the menu. I have attached multiple links in the screenshot below.

    This happens every time, any monitor I appointed as my primary monitor. I made a new installation of Windows 7 (low first hard drive upgrade) (x 64), all my drivers by the Web sites of manufacturers and Windows Update, installed updated Firefox 5.0.1 with no Add-ons and it still happens. If I swap which monitor is my main, the problem follows the secondary monitor. I was running an ATI Radeon HD 4870 and suspected the map (because ATI blows and do not support one of their cards to Professional workstation that comes in my PC caught fire and has less than a year and a half old), so I went out and bought a new PNY GTX card 460SSC, downloaded the latest drivers and the problem persists. I have restored my video drivers in a full version (from v275.xxx to v274.xxx) and the problem persists. I also just discovered that the menus are corrupt in Add-ons too, namely FireFTP menus when you bring them down.

    Screenshot 1
    Screenshot 2
    Screenshot 3
    Screenshot 4

    The solution posted in fixed wire underneath it for me:

    "Tools > Options > general (tab) > advanced.

    Under navigation try disabling use hardware acceleration when available. "

    http://support.Mozilla.com/en-us/questions/779732

  • Several drop down menus E-mail to multiple recipients

    Hello

    I try to get 3 different menus to determine the multiple recipients of a form sent. I can't seem to get them all to work at once,... .only one or the other. It is the click event script that I use on the submit button. Could someone help me identify what's wrong with my syntax (particularly vEmail portions)?

    // First check if there are null values, then construct email using script
    var vEmail =  "";
    var vSubject = ""; 
    var vBody = "Attached to this email is a Field Service Issue - Parts Order Form."; 
    var vName = ""; 
    var vCC = "[email protected]"; 
    var vFormat = "PDF"; 
    var errorMessage = "You have not provided enough information:";  
    
    {
         vSubject = "Field Service Issue - Parts Order Form"; 
    }
    
    // Check email address field and build error message
    if (Page1.SendFormTo.rawValue == null || Page1.RSM.rawValue == null || Page1.CST.rawValue == null)
    {
         errorMessage = errorMessage + "\n - Please select who you want to send this form to, including RSM & CST."; 
    }
    else
    {
         vEmail = Page1.SendFormTo.rawValue, Page1.RSM.rawValue, Page1.CST.rawValue;
    }
    {
         vCC = "[email protected]"; 
    }
    
    // If fields required for script are null, warn user and do not initiate email
    if (Page1.SendFormTo.rawValue == null)
    {
         xfa.host.messageBox(errorMessage, "Sending an email", 0, 0); // Send out a custom error message if any of these fields are null
    }
    else
    {
         // Everything is OK, send email
         event.target.submitForm({cURL:"mailto: "+ vEmail +"?subject=" + vSubject +"&body=" + vBody + "&cc=" + vCC,cSubmitAs:vFormat,cCharset:"utf-8"});
    }
    
    

    Kind regards

    ZeroZone

    I guess the problem is with your concatination... I see a problem with the following line of code...

    vEmail

    = Page1.SendFormTo.rawValue, Page1.RSM.rawValue, Page1.CST.rawValue;

    I would like to use next... to concatinate all email addresses...

    vEmail

    = Page1.SendFormTo.rawValue + ',' + Page1.RSM.rawValue + ', ' + Page1.CST.rawValue;

Maybe you are looking for

  • Safari crashes a lot IOS 9.3.1

    I don't know if I'm the only one who has this problem, but I installed the latest version of iOS and I have a problem that occurs when I try to use safari app with VPN. I tried to uninstall the vpn and the problem has not disappeared. IF someobe have

  • Re: Replacement CMOS / RTC battery for Satellite A200-244

    Hello I'm after a replacement of the RTC battery for my A200-244 I had my machine open and find the battery, but there is no model number on it. I read the post by saying that the battery is part of the Commission and the Council must replace, but if

  • program of slowdown

    Hello I have sub (rather large) created ONU No. 9 LabVIEW program. This program slowed as his execution until ' to hang pour buffer of for the problem of the United Nations. My program contains lectures (en permanence) on analog and digital inputs as

  • Critical update is broken in Internet Explorer

    I have a XP SP3 operating system, I just install this critical update of May 1, 2014: Windows XP Service Pack 3 Internet explore 8 (2964358) Remote Code execution Criticism None from there: https://TechNet.Microsoft.com/en-us/library/security/MS14-02

  • I added on a new printer and lost my audio. What should I do?

    I added on a new printer and lost my audio. What should I do?