Code to not allow text to field two fields at the same time

Hi guys,.

I would like to ask for your help on a JavaScript code.

I don't have much experience with JavaScript and I am trying to add a code for a pop up to warn the user that only one field must be filled.

In the form, there are two main types of fields and the user must only fill one of them and not the two of them.

Is there a way to add a code to each text field to alert the user of this single text field to fill?

In the first text field, you can use a custom like this validation script:

Script for custom text to validate field

If the entry is not empty...

If {(event.value)

Refuse entry if the other field is not empty

Event.RC =! getField("Text2").valueAsString;

Display a pop-up message if the entry has been rejected

If (! event.rc) {}

App.Alert ("error goes here.", 3 ");

}

}

but replace "Text2" with the name of the other field. Use the same validation script in the other field, but change the name of the field for the name of the first field.

Tags: Acrobat

Similar Questions

  • Has taken pc in for Reg. gliches & fix, now the speakers will not work! Have chked everything I know, still sound like dubbing, or two channels at the same time?

    I run a custom built Tower pc, with windows xp svc pk 3 on this subject. ASUS MB brd. have a large woofer and two small tweets, it looks like that I play the song even in two places at the same time, only not synchronized.  All confused, lived all the diagnostic test can think and all say it works fine of course.  As a result, been combing of this Council, but can't really find something sufficiently specific for this problem.  Or if it's here, Miss me him!  For any help would be appreciated, I wish you my songs back!  I tried to play off of windows media and hard drive also.

    BTW, I'm the old lady of 58, so, could you young computer scientists Genesis keep it as simple as possible!  Please, I beg you! Thank you very much!!

    Hello

    1. what Media Player do you use?

    Try and proceed as described in the link.

    How to fix sound problems in Windows XP:

    http://support.Microsoft.com/kb/307918/en-GB

  • Two applications at the same time on the M200?

    On the Amazon website (and I'm sure elsewhere), it says on the M200:
    "With the optional Tablet Multi Dock station, you can connect an external keyboard and monitor allowing you to run different applications on screens separated at the same time."
    I've been reading my M200 and the multidock and it doesn't say how to do this. It seems strange when it's supposed to be something special you can do with the M200, he's not telling how you do! Could someone enlighten me please?
    Thank you very much

    Hello

    In my view, this means that the option of extended desktop.
    If the external monitor is plugged so that you can use this option to enlarge the display option. This option, you can activate with the key FN + F5 combination. If this option is enabled for example, you can open two widows of IE and one from this window, you can switch to the external display. In this case, you can use two applications at the same time

    Good bye

  • Mr President, how can I enter two rows at the same time with different default values that only the first line to use see?

    Mr President.

    My worm jdev is 12.2.1

    How to enter two rows at the same time with different default values that only the first line to use see?

    Suppose I have a table with four fields as below

    "DEBIT" VARCHAR2(7) , 
      "DRNAME" VARCHAR2(50),
      "CREDIT" VARCHAR2(7) , 
      "CRNAME" VARCHAR2(50),
    

    Now I want that when I click on a button (create an insert) to create the first line with the default values below

    firstrow.png

    So if I click on the button and then validate the second row with different values is also inserted on commit.

    The value of the second row are like the picture below

    tworows.png

    But the second row should be invisible. It could be achieved by adding vc in the vo.

    The difficult part in my question is therefore, to add the second row with the new default values.

    Because I already added default values in the first row.

    Now how to add second time default values.

    Concerning

    Mr President

    I change the code given by expensive Sameh Nassar and get my results.

    Thanks once again dear Sameh Nassar .

    My code to get my goal is

    First line of code is

        protected void doDML(int operation, TransactionEvent e) {    
    
            if(operation != DML_DELETE)
                 {
                     setAmount(getPurqty().multiply(getUnitpurprice()));
                 } 
    
            if (operation == DML_INSERT )
                       {
                               System.out.println("I am in Insert with vid= " + getVid());
                           insertSecondRowInDatabase(getVid(),getLineitem(),"6010010","SALES TAX PAYABLE",
                            (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                           }
    
            if(operation == DML_UPDATE)
                              {                                                    
    
                                 System.out.println("I am in Update with vid= " + getVid());
                             updateSecondRowInDatabase(getVid(),
                                 (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                              }                      
    
            super.doDML(operation, e);
        }
        private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "Insert into vdet (VID,LINEITEM,DEBIT,DRNAME,AMOUNT) values " +
                 "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "','" + value5 + "')";  
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }
                  }  
    
                  private void updateSecondRowInDatabase(Object value1, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "update vdet set  AMOUNT='"+ value5+"' where VID='" + value1 + "'";                     
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);  
    
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }                  
    
                  }
    

    Second line code is inside a bean method

        public void addNewPurchaseVoucher(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");
                   RowSetIterator rsi = dciter.getRowSetIterator();
                   Row lastRow = rsi.last();
                   int lastRowIndex = rsi.getRangeIndexOf(lastRow);
                   Row newRow = rsi.createRow();
                   newRow.setNewRowState(Row.STATUS_NEW);
                   rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);
                   rsi.setCurrentRow(newRow);
    
                   BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");
                   RowSetIterator rsi1 = dciter1.getRowSetIterator();
                   Row lastRow1 = rsi1.last();
                   int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);
                   Row newRow1 = rsi1.createRow();
                   newRow1.setNewRowState(Row.STATUS_NEW);
                   rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);
                   rsi1.setCurrentRow(newRow1);
        }
    

    And final saveUpdate method is

        public void saveUpdateButton(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindingsBC = BindingContext.getCurrent().getCurrentBindingsEntry();      
    
                   OperationBinding commit = bindingsBC.getOperationBinding("Commit");
                   commit.execute(); 
    
            OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit");
            operationBinding.execute();
            DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("VdetView1Iterator");// write iterator name from pageDef.
            iter.getViewObject().executeQuery();  
    
        }
    

    Thanks for all the cooperation to obtain the desired results.

    Concerning

  • Two Dynadocks on Mac - VGA two displays at the same time?

    I have two Dynadocks: PA3542EY1PRP and PA3541EY1PRP.

    They are connected to the iMac 21 'Snow Leopard'.
    All USB ports work but I can't run that two VGA displays simultaneously.

    If one works, the other doesn't.
    Display links drivers are updated.
    There must be a conflict.

    Any help is appreciated.
    Thank you very much.

    Hmm I'm not really sure if the system can access two external graphics chips Dynadock Mr. the fact is that you need to install the Dynadock software and my knowledge, it not have access two GPUs at the same time.

  • two cursors at the same time move under a certain condition

    I'm trying to move the two sliders at the same time under a given the conditions. I have my program set up as follows:

    When 1st setting on "Continuous", all output values 4.

    When the 1st setting on "Pulse", values output based on ' 'Send the Signal' button support according to the following below:

    1 1 shows the value of cursor 1 and 2 slider when the switch is on "simultaneous."

    2. the cursor 1 and 2 output the value of cursor 1 and 2 slider when the value of "independent".

    My question is based on 1 above. I basically have a hard time trying to figure out when the condition is set to "Simultaneous" be able to see cursor 2 movement.

    Can anyone help? A large part would be appreciated.

    NOTE: The output is correct how I want it. I want just the cursor 2 move when cursor 1 must move under a certain condition.

    All I needed was to move the Slider 2 property node before the total multiplcation.

    Thanks again James.Morris for your help!

  • Avoid to get two theards at the same time

    Hello

    I was wondering how to avoid to run two threads at the same time in teststand. When I using teststand, I found it can run two threads in simultaneity.for example, I can open a file sequence, using single-pass enter point to run a theard, when this theard is not finished, I use single-pass or TestUUTs enter point to run other theard. I want to avoid this case. Is there settings, we can get motor teststand to tell me a thread is running or not?

    Thank you!

    You write a custom user interface? If you use an application Manager (all the example user interfaces and the sequence editor to do), you can see:

    ApplicationManager.Executions.Count > 0

    If you use just the engine that you can keep the number of executions by increment your account upon receipt of the UIMsg_StartExecution UIMessage and reduce your number when UIMsg_EndExecution is received.

    If instead you want to determine the number of executions of a sequence running, you can use RunState.Engine.GetInternalOption () to get a reference to the Application Manager (at least of the UIS and the sequence editor that use an Application Manager) and then do the following ActiveX to get the Executions.Count property.

    Hope this helps,

    -Doug

  • Two users on the same PC. How to run the application even for two users at the same time?

    Hello friends,

    I have two user accounts on my pc. Is it possible to run the same application (for example: DEFRAG or disc cleanup utlities) for two users at the same time? I mean, these utlilities work by all of the computer or user account? That would mean the same application to perform for a single user in the background and foreground to the user, or I'm totally lost in space?

    Thank you for your comments

    You should run Disk Cleanup in each user account. Do not try to shut it down or change user when defragmentation; system files may be damaged. You must stop the defragmentation, log off, restart the defragmentation and don't really no point for it. MS - MVP - Elephant Boy computers - don't panic!

  • Reconfigure fails when adding two volumes at the same time

    Hi all

    We use vRealize ver 6.2.1 6.2.1 Build Automation - 2543390.

    We found a bug strange reconfiguration of a virtual machine. If I add a volume of hd at a time, there is no problem. But if I try to add two volumes at the same time him reconfigure fails with the message "reconfigures has not, waiting for retry.

    On the vRA 'Infrastructure-monitoring-> log >' error is: "machine Reconfigure failed: Machine: xxx, error: apply WaitForTask StorageDrsRecomendations_Task Enttity...» XXXX.VMDK invalid data store path.

    On vCenter Console, the error is: "path of the invalid data store [Cluster... vmdk]."

    The same error occurs using vCenter 5.5 x and 6.x

    Any ideas?

    Thank you very much

    D.

    It was a problem with DTS investment by vRA. We have identified the problem and the fix will be available in the next version.

    Thank you

    Kumaran

  • two microphones at the same time (hearing CC)

    Hello, it is possible Records two microphones at the same time? in hearing CC... I have two USB microphones, but only lets me put a default value.

    You have just to face why I always recommend against USB microphones for something else that the simple, single microphone, no request for surveillance-style.  For anything else, you would have been better with a couple of microphones XLR and a basic USB interface.  This is not a hearing problem... most of usb microphones just use the Windows Audio drivers and that is what limits you to a single microphone.

    You MAY be able to do this work by downloading ASIO4ALL ASIO4ALL - universal ASIO Driver universal driver and this aid instead of the Windows Sound drivers.  It takes some fiddling and while reading the instructions.  Otherwise, I've also heard people using a cable Audio virtual Virtual Audio Cable Home Page to achieve the same thing - but beware, it is NOT free and takes a lot of detailed configuration.

    Me?  I'll find someone who wants to buy two second-hand pickups USB then put money into two USB microphones and a basic interface to both channels.  Despite the assertions of 'plug and play', it would be much simpler (and flexibility) as soon as you want to do more than using a single microphone.

  • Running two Apps on two computers at the same time

    I know the ability to install on two computers CC and I saw the restriction of not being able to run applications on two different computers at the same time.

    My question is, does that mean that all the two apps at the same time or cannot run the same application on two computers at the same time?

    For example, my daughter can use Flash while I use Illustrator on the same CC account?

    For example, my daughter can use Flash while I use Illustrator on the same CC account?

    # The license is for you and you alone. It is not a shared license.

    Your daughter must have its own Adobe ID and its own subscription to use the software.

  • Can I use the CC apps on my two computers at the same time?

    A full individual membership, two computers simultaneously, using 2 different applications of CC. For example: I am editing/export in Premiere Pro on one, audio with hearing or graphics with Photoshop on the other. Is this OK and I will be able to access creative cloud of these two computers at the same time?

    Thank you! Christy

    Hi John,.

    There was some confusion on this subject at the launch of creative cloud. The EULA States that you can install it on two computers at once, however, you may not use the applications on those computers simultaneously. This is the case even when you are not in the same application. Sorry for the confusion.

    Thank you
    Kevin

  • With Creative Cloud, can run us applications on two computers at the same time?

    Hello

    (First Question):

    I have two diffrant PC with the same OS (Windows 7),

    can I use any application on the two PCs at the same time with my plan full creative cloud for individuals - annual.

    ((Deuxième Question):

    If the answer to my question above is yes then my second question is that I use my laptop at home, except office hours so it is possible

    to install creative cloud on my third machine (Windows - computer laptop at home).

    Example: Can I use Creative cloud when I am connected at home and not in the desktop.

    First question: Yes

    See Q3 in respect of development underway in the FAQ

    http://www.Adobe.com/products/creativecloud/FAQ.html

    Second question: not easily.

    Your cloud membership entitles you to 2 simultaneous activations only max.

    To use it on the 3rd computer, you should disable first on the desktop computer. Then re-enable the next day.

  • Run different applications in Creative Suites on two computers at the same time.

    I have a backlog of mini tape DV from my vacation for 10 years.  The rear reason is because slow computers have made a personal production until the very slow DVD creation.  I've recently updated to 4-core i7 with unique HDs and on the point of buying a custom built 6 hearts i7 with SSD and RAID HDs.  I understand that I can install Creative Suite Production Premium 5.5 on two computers.  One facility is already on the coreI-4.   I intend to install the second installation on the 6-core.  I would use the 6-core for production, while the 4 - core is the capture of DV cassettes.

    If I had bought a copy of an application separate and installed on separate computers, I'd be able to run them at the same time.  Is there a way I can run two computers at the same time with Creative Suite to accelerate personal production for example can I run separate from the Creative Suite applications, I want to use separate programs, on two computers at the same time, as long as these requests are not the same?

    You can run the same or different adobe products to the same or different times on the same or different computers (except that you can not run the same program more than once on the same computer at the same time).

  • Creating records from two Tables at the same time...

    I would be very grateful if someone could help with the following query.

    I have two Tables, Tbl1 and Tbl2. Tbl1 has the following columns: -.

    Tbl1_Unique_ID, Description

    Tbl1_Unique_ID is of type ' * number *' and ' * PK * ', Description is of type' * Varchar2 *'.

    Tbl2 has the following columns: -.

    Tbl2_Unique_ID, Description, Tbl1_Unique_ID

    Tbl2_Unique_ID is of type ' * number *' and is the ' * PK * ', Description is of type' * Varchar2 *' and Tbl1_Unique_ID is of type ' * number *', is a ' * foreign key *' and is the ' * primary key *' from Tbl1.

    While I can create a page to display and create folders in Tbl1, I'm not course coding required to view and create records Tbl1 and Tbl2 simultaneously, as well as regarding the two together at the same time.

    I know that it involves one ' * INSERT *' statement, but I have problems the correct SQL query.

    Can anyone provide any assistance will be appreciated.

    Have you tried to create a form master / detail page? Because it seems that is what you need...

Maybe you are looking for

  • question about erasing an iPhone via iPhone Find

    small question so, recently I had to erase an iPhone via iPhone Find If I had to re-activate and connect to my iCloud origin, I would receive my messages waiting? Let's say I deleted it and I had a lot of invisible messages, are lost because they hav

  • Windows update fails-G62-225DX - bad startup a factory?

    My nephew came to me recently with a G62-225DX HP, concerned about safety.  Given this machine is several years old (recently handed down from his father - I quickly understood why), I was surprised to see she was always being basic Windows 7 Home Pr

  • confusion between number of peaks in ThresholdPeakDetector

    Hello Today, I tried the ThresholdPeakDetector function and was surprised by the following result: the returned pic indices array contains four values (nonzero), while the return value for the number_of_peaks was only 3... ThresholdPeakDetector (y, p

  • scanner slide

    Mijn dia scanner 100 F (ovt X 86) kan driver niet vinden

  • Start Windows XP external hard drive

    The power supply on the old computer my wife THAT XP has dropped. I had another autour power that I swapped in, but it's not a SATA connector for internal hard drive of the computer. I had a hard drive enclosure and put the drive in it. With the disk