Delete Record Behavior doesn't wait for Submit button

I have master / detail page set.  From the detail set there are links to delete or update a record.  When I click the link to delete the record, it goes to the   confirmation page with the correct record.  Now, when I add the delete record server behavior and a submit button, this is what happens.  As soon as I click the link to go to the delete confirm page, the record deletes and the page redirects to the page I put in the server behavior.  It doesn't show the confirm page and doesn't wait for me to hit the confirm button.  The page runs and successfully deletes the page from the DB.
How do I get it to wait until I hit the submit button?

You need to surround your delete query with an "If" statement that checks for a confirmation variable of some sort, then when the user clicks the confirmation link you can pass the necessary variable and the ID of the record the delete query is expecting.
As an alternative you could use a JS alert fuction to ask the user if they are sure they want to delete the record and then allwo the delet to run after confirmation. To do this you could use code like this...
<input type="submit" name="DELETE" value="DELETE"
   onclick="return confirm('Are you SURE you want to DELETE this record?')">
Lawrence   *Adobe Community Expert*
www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and CF
www.twitter.com/LawrenceCramer

Similar Messages

  • Making Page look same in All Pixels & Writing code for Submit Button.

    Hello All,
    How to make the page look the same in all computers even though the pixels are different?
    Please help me in this regard.
    More Over if I want write the code for Submit button where the code should be written.
    Whether the code is different from normal ABAP coding?
    Warm Regards,
    SampathKumar G.

    Hi Sampath,
    You can trigger mandatory field checks in WDA as in R/3. For this you need to make the "state" property of your input field to "required".
    In addition to this you need to call the static method check_mandatory_attr_on_view of class cl_wd_dynamic_tool. This would then automatically verify if all the mandatory fields have been filled or not. It would then populate the error messages into an internal table and display them in the view. Also the mandatory fields which haven't been filled would be highlighted with a red border. You need to put the below coding into the action up on which you want to trigger the data chesks.
    data: lt_msg TYPE cl_wd_dynamic_tool=>t_check_result_message_tab,
              lo_view_controller TYPE REF TO if_wd_view_controller,
              lo_message_manager type ref to if_wd_message_manager.
      lo_view_controller ?= wd_this->wd_get_api( ).
      lo_message_manager = lo_view_controller->get_message_manager( ).
      cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
        EXPORTING
          view_controller = lo_view_controller
          display_messages = abap_true
        IMPORTING
          messages = lt_msg ).
    Regards,
    Uday

  • Wait for a button click

    Hi,
    Here's the problem :
    my main class calls :
    LoginContext loginContext = new LoginContext("Main",
    new DialogCallbackHandler());
    I've made a DialogCallbackHandler class which opens a JFrame with 2 fields (TextField & PasswordField) and a button "ok".
    But the LoginContext wants immediately an answer (the login & the password). How can I make the loginContext waiting for the button click.
    I tried with a
    while(!buttonClicked);
    but it's not a good solution.
    I also tried with a Thread inside this loop while and sleeps (during a 500 ms). But I think there's a better solution...
    Can I make a wait, and a notify for this or not.
    Thank you for your help.
    Yann
    -- http://www.objectweb.org/jonas

    Why don't you use the JOptionPane class.
    I think it provides all that you need.
    For example use the method :
         String pass = "azedvge";
         JPasswordField passwordField = new JPasswordField(20);
         int result = JOptionPane.showConfirmDialog(parentComponent, password, "Password check", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
         if (result == JOptionPane.OK_OPTION) {
              String p = new String(passwordField.getPassword());
              if (p.equals(pass)) {
                   // OK !
              else {
                   System.exit(0);
         else {
              System.exit(0);
    I hope this helps,
    Denis

  • Wait For A Button Press

    Hey, I am currently creating a game and need to know how to wait for a certain button to be pressed. A popup message comes up that tells the user to press a button, then I need to wait for the button to be pressed. Then once the button is pressed, I want another message to come up. The problem is, I have no idea how to wait for a button press after the first message comes up. Instead it just displays the first message, then the second directly after.
    Thanks

    So you have a button that is always present. Normally clicking the button does nothing. But sometimes a message shows up, in which case if the user clicks the button, something happens. Right?
    UI principles aside (it's bad form to display a button that does nothing), this is pretty simple.
    Create a field to track whether the button does anything. For example:
    private boolean buttonActive = false;In your action listener for that button, first check the value:
    public void actionPerformed(ActionEvent e) {
        if (buttonActive) {
            // do your thing
    }If the buttonActive is true, it does something, otherwise it does nothing.
    After you display the message, set buttonActive to true. When you want the button to become a brick again, set it to false.

  • P965 platinum SATA issues (doesn't wait for disk spinup!!!!!!!!)

    Hi
    I've recently migrated from a 2-HD setup (seagate & hitachi) that worked just fine to a single hd setup (western digital WD3200AAKS).
    Now when I turn on the pc, the BIOS goes too fast and doesn't wait enough time for the disk to spin up (since the WD disk has a considerably longer spinup time), and for the first boot, there's no HD detected. It simply hangs.
    In fact, i can see the line "Detecting SATA PORT 2..." for a while, but then it writes "not detected" and goes ahead.
    Then if I ctrl-alt-del, it works just fine.
    How can I solve this? Possibly without disabling fast booting!...
    thanks in advance
    bye bye

    Quote from: jsmartin22 on 28-June-07, 13:41:50
    This is note the solution wanted to hear, but it is reasonable:  Why not dump the WD and get a new drive?   For ~$100 you can get a new 500 GB SATA drive and for the price of a little more than $100, you will have your system integrity; and you can probably sell the WD drive or use it with another MB/computer.    Something to think about maybe?  Good luck. 
    I've just changed it! It's a 320gb drive but it has all the bells&whistles of its 500gb big brothers! Perpendicular recording, ncq, and etc...
    In fact, apart from that spin-up issue, is blazing fast, even faster than Seagates!

  • System hangs mounting encrypted lvm, doesn't wait for password

    I have a system with two hard drives, each that has a separate encrypted lvm. The drive with my / parition mounts fine, using the grub command line cryptdevice paramater.
    But the second encrypted partition on the second hard drive, defined in crypttab, causes the system to hang during boot. I get a message: "a start job is running for cryptography setup" and a little moving asterick while the system waits. At the same time there is a second similar message with moving asterick: "a start job is running for" and the name of the lvm device to be started. And if I define all the volumes on the lvm to be mounted in fstab, I get yet more "a start job is running" messages and hangs for them, all simultaneously.
    It seems like the system is not stopping and waiting for the password, before trying to start the lvm and then hanging. I've found that I actually can type in the password while the system is stuck like this (though the screen doesn't really register that I'm typing a password) and then the system will continue and start the lvm and mount volumes properly as defined in fstab.
    I don't really know much about how all this stuff works, but gather from reading around that perhaps systemd is not waiting for the password, before tying to automatically start the lvm? And tha'ts causing the hang. (I have LMDE installed with a separate /boot parition on the same number 1 drive and it boots as expected, I'm assuming this is because it's not using systemd.)
    The only post that I could find that remotely seemed similar to my problem is this: https://bbs.archlinux.org/viewtopic.php?id=153811
    But I don't really follow what's being said in that thread or the solution, regard the .service file. Where is is? What would I edit in it? Is that what I want to do?
    Thanks to anyone for any help on this.

    Well I just figured out that I put the wrong UUID in /etc/fstab. /dev/sdb1 (the disk being unlocked) != /dev/mapper/crypt2 (the unlocked partition). Now everything works as it should.
    Last edited by houron102 (2012-09-14 01:19:47)

  • FM JOB_CLOSE doesn't wait for pred job even when pred_jobname/jobcount set

    Dear experts,
    I need to call in sequential order two batch jobs when there is a special condition. It's not always the case, which means when there is no successor task, then the job should be executed immediately. But when there is another waiting in the queue, then
    I set the parameters pred_jobcount/pred_jobname so that the next job is executed when the previous is finished.
    I tried with the combination of several parameters, read lots of help and checked example programs, but the problem I've got: either both jobs are launched at the same time (so it does';t really wait for the predecessor to be completed sucessfully even if predjob_checkstat is set to X), or the second job is never launched at all! Here is the call of JOB_CLOSE:
    AS_PRED contains the correct information of the predecessor job (I verified against SM37 and no problem there). For the first job to be launched, I have no issue at all. However the successor is not launched at all!
    (Just to play around and to test some other parameter combination, I called the FM with strtimmed always set to X but then both jobs are launched at the same time, which is not convenient for me!).
    IF as_pred IS INITIAL.
        lv_strt_immed = 'X'.
      ELSE.
        lv_strt_immed = space..
        lv_checkstat = 'X'.
      ENDIF.
    * Plan job with direct start after predecessor job (if available)
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = me->job_count
          jobname              = me->job_name
          pred_jobcount        = as_pred-predjobcnt
          pred_jobname         = as_pred-predjob
          predjob_checkstat    = lv_checkstat
          strtimmed            = lv_strt_immed
        IMPORTING
          job_was_released     = lp_job_released
        EXCEPTIONS
          cant_start_immediate = 1
          invalid_startdate    = 2
          jobname_missing      = 3
          job_close_failed     = 4
          job_nosteps          = 5
          job_notex            = 6
          lock_failed          = 7
          invalid_target       = 8
          OTHERS               = 9.
    Do you have any hint what might be wrong with the function call above?
    Many thanks for you help, best regards
    Ebru

    BP_JOB_CREATE can be used to create dependent jobs. The below sample program creates a chain of jobs. Prerequisite: the report program YTEST should exist.
    ++++++++++++++++++++++
    REPORT  yjob_chain.
    DATA cntr(3) TYPE n.
    PARAMETERS:
      job_str(10) TYPE c DEFAULT 'ABC', "default jobname template
      p_njobs TYPE i. "number of nodes in chain
    DATA jobname LIKE tbtcjob-jobname.
    DATA jobcount LIKE tbtcjob-jobcount.
    DATA pred_jobname LIKE tbtcjob-jobname.
    DATA pred_jobcount LIKE tbtcjob-jobcount.
    DATA flg_1stjob TYPE c.
    START-OF-SELECTION.
      CLEAR flg_1stjob.
      DO p_njobs TIMES.
        PERFORM create_job.
      ENDDO.
    *&      Form  create_job
    *       text
    FORM create_job.
      DATA global_job01 TYPE tbtcjob.
      DATA global_job02 TYPE tbtcjob.
      DATA steplist TYPE STANDARD TABLE OF tbtcstep.
      DATA stepline TYPE tbtcstep.
      stepline-program = 'YTEST'.
      stepline-typ = 'A'.
      stepline-authcknam = sy-uname.
      APPEND stepline TO steplist.
      cntr = cntr + 1.
      CONCATENATE job_str '-' cntr INTO jobname.
      global_job01-jobname = jobname.
      global_job01-jobclass = 'C'.
      IF flg_1stjob IS NOT INITIAL.
        global_job01-eventid = 'SAP_END_OF_JOB'.
        global_job01-eventparm = pred_jobname.
        global_job01-eventcount = pred_jobcount.
      ELSE.
        global_job01-reldate = sy-datum.
        global_job01-reltime = sy-timlo.
        global_job01-strtdate = sy-datum + 1.
        global_job01-strttime = '010000'.
      ENDIF.
      CALL FUNCTION 'BP_JOB_CREATE'
        EXPORTING
          job_cr_dialog       = 'N'
          job_cr_head_inp     = global_job01
        IMPORTING
          job_cr_head_out     = global_job02
        TABLES
          job_cr_steplist     = steplist
        EXCEPTIONS
          cant_create_job     = 1
          invalid_dialog_type = 2
          invalid_job_data    = 3
          job_create_canceled = 4
          OTHERS              = 5.
      IF sy-subrc = 0.
        pred_jobname = jobname.
        pred_jobcount = global_job02-jobcount.
        flg_1stjob = 'X'.
        WRITE:/ 'Created Job- ', 'Name: ', global_job02-jobname, 'Number: ', global_job02-jobcount.
      ELSE.
        WRITE:/ 'Error creating job'.
      ENDIF.
    ENDFORM.                    "create_job

  • Automator doesn't wait for app to finish launching.

    During "watch me do" actions that lauch an app Automator does not wait for the app to launch. This seems like a bug since Automator does infact know it is launching an app, this shouldn't be something that should require a sleep every time.

    Did you try one these actions?

  • Lion doesn't wait for DHCPACK on wifi after resume?

    I've been noticing this occasionally on my MBA, and just got asked about it by someone else who's also seeing it:  when resuming Lion with a WiFi connection, sometimes it will bring the network up for a couple seconds, then drop for a bit with the WiFi icon showing it requesting an IP address, then come back.  HardwareGrowler shows it initially coming up with the same address it had been using when suspended, then eventually getting a new address, which leads me to believe that Lion is speculatively bringing up the interface on the old address without waiting for a DHCPACK; if it gets DHCPNAK instead, it then has to take the interface back down and go through the usual DHCPREQUEST/DHCPOFFER dialog with the DHCP server.
    Is there a way to make it wait until it has received a reliable address (either DHCPACK to the old lease or the full DHCP negotiation) before bringing the interface up, rather than having it "stutter" when the original lease isn't ACKed?
    FWIW I have seen this with all versions of Lion.  I don't recall seeing it with older versions.

    NOTE:  I did exactly what you want to do all the time, and it works very well.  BUT I have set things up so that this works.
    Do both WiFi and Ethernet get the same IP address from your router?  If not, then your existing file sharing setup is already established over the IP address assocaited with WiFi and that is where your transfer is going to stay.
    Again, if you are currently getting different IP addresses, then I see 2 approaches
    a) If your router's DHCP server allows associating an IP address with either a system's MAC address (Media Access Control; looks like nn:nn:nn:nn:nn:nn), or by associating an IP address with the "DHCP Client ID" (See System Preferences -> Network -> Advanced -> TCP/IP -> DHCP -> DHCP Client ID), then configure your router so that both the WiFi and Ethernet are connections to the router are assigned the same IP address.
    b) another approach is to change each Mac's network setup so that they used Fixed IP addresses when at home (you can create a new network location for home use).  You would configure the WiFi and Ethernet interfaces so they have the same IP address (each Mac gets its own unique IP address, and if possible the address you assign should be outside the router's DHCP address range, so that the router does not assign a duplicate address).
    If both interfaces have the same IP address, then when you plug in the Ethernet cable (assuming the interface order has Ethernet as higher than WiFi - which is the default)

  • Edit email for submit button and Javascript?

    How can I change an email address attached to a submit  button on a previously created form? 2) How can I see if JavaScript is being used with form? A prior team member created interactive forms with a submit button. Email address attached to button needs to be updated. I tried to edit in Acrobat Pro by double  clicking the button to access the properties panel, but it doesn't open. If I recreate the form to amend the address, my file size is about 1/3 of the original which leads me to believe there is JavaScript.

    Thank you. My version of Adobe Acrobat Pro X  Tools- Forms edits in
    LiveCycle Designer after the form has been created and saved.. There is no
    other edit option as shown in the screen print below. The action wizard in
    Pro doesn't seem to apply in this case. I had tried right clicking the
    button in both Pro and LiveCycle previously to no avail. However, when the
    form opens in LiveCycle, I just figured out that there is an object window
    that allowed me to modify the email address.
    However, I don't understand the file size difference or even how to find
    the JS. We both used the same original word docx. His file size is 47K and
    my recreated file is 19K, a big difference. I didn't compress mine. Any
    thoughts on what is causing the difference? The forms are on a client's
    website for external users to complete so load time is still important.
    Thanks,Vickie
    On Fri, May 23, 2014 at 4:24 AM, Gilad D (try67)

  • LifeCycle 8 Database update script for submit button

    I have a form that has numerous text fields for user inputs. I put a button on the form. This form is also populated with a SQL query when opened.
    When the user clicks the submit button, I need to capture the info entered in these fields, get one of the field value from the query when opened, and update a database record.
    How is that script done? Any sample scripts?
    Thanks in advance.

    I have a form that has numerous text fields for user inputs. I put a button on the form. This form is also populated with a SQL query when opened.
    When the user clicks the submit button, I need to capture the info entered in these fields, get one of the field value from the query when opened, and update a database record.
    How is that script done? Any sample scripts?
    Thanks in advance.

  • How to add multiple records in table thru form via Submit button

    Hi all
    i have small requirement as follows.
    i have a view in which i have 3 UI elements one is webdynpro form,Table UI element and third one is submit button.
    now at runtime when i will enter the details in the form and click on the submit button then those record details has been stored in Table. then next time again when i submit the form with details then the table contains all records of current and existing ...so table has to maintain mutile records thru form via submit form..
    i need sample code on the same.
    points are always rewardable
    Thanks
    Sunil

    Hi,
    Create one context attribute and map it to the Inputfiled and one submit button, create a node with a valueattribute map it to a Table and in onActionsubmit write this code
    public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionsubmit(ServerEvent)
        String str=wdContext.currentContextElement().getInputfiledattribute();
        IPrivateTableformView.ITablenodeNode node=wdContext.nodeTablenode();
       IPrivateTableformView.ITablenodeElement ele=node.createTablenodeElement();
       ele.setNodeattribute(str);
       node.addElement(ele);
        //@@end
    thanx,
    ramani.p

  • Adobe Acrobat X Pro - Javascript for submit button

    Hi,
    I am new to Adobe Acrobat X Pro and I have just designed a fillable form and enabled user rights for reader, for them to send the form back as a PDF. I created the form with a submit button and have mailto:[email protected] but I want to know if it is possible to create a button that will run a javascript to bring up a persons Mircosoft Outlook contacts, so they can choose who they want to send the completed form too.
    Any help would be greatly appreciated.
    Thanks.

    See post #7 and #10 in the following topic: http://forums.adobe.com/thread/793083?tstart=0

  • How to text for Submit button in different languages.

    Hi All
    We have a requirement to add 'Submit Button' in iSupplier Portal's Standard Pages.
    We have substituted the controller to add the Submit button and it works fine also .
    Our Application has 7 different languages, so the requirement is to show the button Text w.r.t the
    language only .
    We have written the following code
    OASubmitButtonBean oasb= (OASubmitButtonBean)oapagecontext.getWebBeanFactory().createWebBean(oapagecontext,"BUTTON_SUBMIT");
    oasb.setID("IPOPrintReportButton");
    oasb.setUINodeName("IPOPrintReportButton");
    oasb.setEvent("IPOPrintReportButton");
    oasb.setText("IPO Print Report Button");
    //oasb.setTranslatableText("XXIPO","XXIPO_PRINT_REPORT_TXT");
    pageButtonBarBean2.addIndexedChild(oasb);
    when we have used setText method , we are getting the same name in every language. so we tried using setTranslatableText Method and gave it the Messages to set the Button Text. But Now button text is empty .
    Pls tell us how to achieve this requirement of having text in different languages on the button ..w.r.t the environment language. we have also defined same Message 'XXIPO_PRINT_REPORT_TXT' for other languages.
    naveen

    Hi Kumar
    Can u pls brief this a little more .
    Lets say I get the language as German in the Controller . Now how do i set the test for the submit button .
    Do u mean to say I should check like this:
    If (langaue is german )
    button.setText("German Submit")
    else if (langauge is netherland)
    button.setText("Netherland Submit")
    harcoding the vaues in the contorller??

  • Two actions for submit button

    Hi
    I'm new to modifying pdfs so please excuse me.  I have a form with a submit button and the action associated is
    I want to add this script:
    but the form will only do 1 action in the event node.  So how can I make it show the message box and then do the submit? please note that the forum removed the script tags

    Hello,
    You can link your button actionListener to a manageBean method and into this method, call your to ExecuteWithParams binding operation like
    public void actionListener(ActionEvent actionEvent) {
         BindingContext bindingContext = BindingContext.getCurrent();
         BindingContainer bindings = bindingContext.getCurrentBindingsEntry();
         OperationBinding opBinding1 = ((DCBindingContainer)bindings).getOperationBinding("ExecuteWithParams1");
         opBinding1.execute();
         OperationBinding opBinding2 = ((DCBindingContainer)bindings).getOperationBinding("ExecuteWithParams2");
         opBinding2.execute();
    }This also can be included into a valueChangeListener binded to an input component for example
    public void changeListener(ValueChangeEvent valueChangeEvent) {
         BindingContext bindingContext = BindingContext.getCurrent();
         BindingContainer bindings = bindingContext.getCurrentBindingsEntry();
         OperationBinding opBinding1 = ((DCBindingContainer)bindings).getOperationBinding("ExecuteWithParams1");
         opBinding1.execute();
         OperationBinding opBinding2 = ((DCBindingContainer)bindings).getOperationBinding("ExecuteWithParams2");
         opBinding2.execute();
    }Jack

Maybe you are looking for