button with message of confirmation and process of PL/SQL

HY!

I need a button with a confirmation message ("really do you want... (' = > OK, cancel)

If the user clicks "OK" the PL/SQL process should do an insert.

For the button, I defined Action: "javascript:confirmSubmit('Would_you...?','RESUBMIT')."

and in the header of the document I have:

<script type="text/javascript">
//<![CDATA[

function confirmSubmit(msg,req){
    if(req==null){req='Submit'}
    var confSub = msg;
    if(confSub == null){
        confSub= confirm("Would you ...?");
    }else{
        confSub= confirm(msg);}
    if (confSub==true){doSubmit(req);}
}
      
//]]>
</script>

The process of PL/SQL does not work after pressing the button (I choose the right button to "When Button pressed").

But the process works well, if I choose any State of the button.

Why is it like that?

And how can I get there?

Hello

How about using apex.confirm ( JavaScript API )? Then you can condition the process based on the REQUEST.

Welcome.

Tags: Database

Similar Questions

  • Button to call popup, confirm appeal process from PL/SQL?

    My apologies in advance to be new at the APEX. I don't know javascript, PL/SQL.
    I have an HTML page with a top button named "Deactivate". When I click on the button
    I'd like a contextual dialog box confirming that I would do the inactive file.

    So if the user clicks "OK", then I would a process of PL/SQL to update my table row
    (I have the primary key of the row stored in an item on the page). Should be simple right?

    Thank you in advance.

    Carol

    Hello

    There are several ways that you can do. We'd watch the feature around a button Delete in a form that this popup a message asking the user to confirm the deletion.

    What I tend to do, however, is to have a defined button template that allows me to run some JavaScript by clicking on the button, but without presenting the page.

    To do this, you must first create a new model of button:

    1 - Go to the components shared, models
    2 - Click on create to create a new model and when you are prompted, enter / select the following text:
    -Click on the model type
    -Check that you have selected 'as a copy of any existing model.
    -Find the "Button" model (or one you use the most for your pages - we will take a copy of it and work on it)
    -Change the name of "Copy of the button" "Button for javascript" (or something similar) and select Yes to copy
    3. then click on to create the template
    4 - once created, locate and change the model by clicking on the link for the name of the new model
    5. in the new model, you have a template parameter. What you see will depend on what theme you are using and which button you copied.

    You will see probably in there somewhere something like:

    <a href="#LINK#">#LABEL#</a>
    

    This is to change:

    <a href="#" #BUTTON_ATTRIBUTES#>#LABEL#</a>
    

    then click on apply changes to save this.

    #LINK # would be replaced by the feature that submits the page

    href = "#" indicates to the browser not to move to another page when the user clicks on the button

    #BUTTON_ATTRIBUTES # allows you to use the "Key Attributes" setting a button to control what happens when the button is clicked.

    If you have any other attribute in the tag has (for example, class = "... "), do not remove those. If there is nothing else in the template parameter, do not change that either (for example, the button may actually be in the TABLE tags and we need those to keep the structure intact)

    Fortunately, this step must be done once the new model button can be used to any button

    We now need to update your button:

    1 Edit button and go down to the setting of the attributes button
    2 - Add in:

    ID="P1_MY_BUTTON" onclick="javascript:confirmDeactivation();"
    

    Change P1_MY_BUTTON regardless of the name of your button is

    3 - change the template used for the button to your new
    4 - Click on apply changes to save as

    Now, we must add in javascript:

    1 - change page attributes (top icon right in the Page Rendering topic Page)
    2 - Go to the creation of the HTML header and add in:

    <script type="javascript">
    function confirmDeactivation()
    (
      if (confirm('Are you sure you want to deactivate this record?'))
      {
        doSubmit('P1_MY_BUTTON');
      }
      else
      {
        return false;
      }
    )
    </script>
    

    3 - Click on apply changes to save as

    Finally, you have your process:

    1 - click on the Add icon processes in the section of the process in the center column
    2. create a new "Anonymous block" PL/SQL process that runs on-demand, after calculations and Validations.
    3 - process code should be something like:

    BEGIN
      UPDATE MYTABLE
      SET STATUS = 'I'
      WHERE PK_ID = :P1_PK_ID;
    END;
    

    P1_PK_ID should be whatever is the name of the page element referencing the primary key of your file

    4. you can provide success or failure messages if you wish
    5. in the settings of Conditions, select P1_MY_BUTTON from the list when you press button
    6. click on create processes

    I'm assuming there's a branch on your page that could be triggered by clicking on this button

    Now, when the user clicks the button, instead of submitting the page, it triggers the javascript code. It prompts the user to confirm the action. If he clicks OK, a doSubmit() runs that shows the page using the name of the button, the value of the claim. The process detects this name and executes the update

    Andy

  • Button with a URL redirect and add a process

    I have a button to redirect to a new URL - in the (action when section clickeded) URL redirection
    with the command - next


    http://172.24.133.6:7001 / Application1-Project1-context-root/servlet1




    I want to not only not only this, but also launch an apex as this process (the process name is called choose_location

    Select: P7_LOCATION_PICK in: double P7_SELECTED_LOCATION;

    update set bi_pub_loc = location: P7_SELECTED_LOCATION where
    ID = 1;

    How can I do both when the button is clicked, thank you, Doug

    The easiest way would be to change the button submit, have an Onsubmit PLSQL process that makes what you mentioned and then have a branch that is redirected to the specified URL.

    Check the button not entered record to submit and to redirect to another page for a similar situation

  • Need to find the Oracle Session with high CPU consumption and process of the BONE

    Hello

    I find the high use of the processor by the command "prstat. The host is running Solaris 5.10 64-bit with a database of Oracle 10.2.0.4.

    The grid, the high command is not available. What is the best way to find Oracle sessions using high processor and operating system processes.

    Thanks in advance.

    -Asif

    naveed27c wrote:
    Thanks, Justin.

    I have alread think SQL from Google. Now the problem is that I find the process of operating system level of Solaris.

    You can join V$ SESSION on the SID. The column PROCESS in V$ SESSION is the ID of the client operating system process.

    Justin

  • The firefox button with all the plugins and Add ons and stuff do not appear... what should I do?

    I saw the video of tutoring for firefox and it says that if I want to add ons to appear I click firefox, but I don't see nowhere... How can I add?

    The Firefox button is not available on the Mac, it's because of how the Mac handles menus.

    For the Mac, to access the Add-ons Manager, on the Tools menu select Add-ons.

  • Rollback and process page PL/SQL

    Hello

    I have a page of process that is triggered when you click on the button. I voluntarily put a wrong in the third UPDATE variable name, but it never restores.
    It returns a page by mistake, but updates 1 and 2 are performed.

    Do you know why?

    BEGIN
    UPDATE cons_appel ca
    SET ca.consommateur_id =: P67_CONSERVER
    WHERE ca.consommateur_id =: P67_SUPPRIMER;

    : P67_ROWCOUNT: = NUMBER OF ROWS SQL %;

    UPDATED cons_document cd
    SET cd.consommateur_id =: P67_CONSERVER
    WHERE cd.consommateur_id =: P67_SUPPRIMER;

    : P67_ROWCOUNT2: = NUMBER OF ROWS SQL %;

    DELETE FROM cons_consommateur cc
    WHERE cc.id =: P67_SUPPRIMER;

    : P67_ROWCOUNT3: = NUMBER OF ROWS SQL %;
    EXCEPTION
    WHILE OTHERS
    THEN
    ROLLBACK;
    : P67_MESSAGE_ERREUR: = SQLERRM;
    END;

    Just use local variables:

    DECLARE
    
      l_rowcount1 PLS_INTEGER;
      l_rowcount2 PLS_INTEGER;
    
    BEGIN
    
      UPDATE cons_appel ca
      SET ca.consommateur_id = :P67_CONSERVER
      WHERE ca.consommateur_id = :P67_SUPPRIMER;
    
      l_rowcount1 := SQL%ROWCOUNT;
    
      UPDATE cons_document cd
      SET cd.consommateur_id = :P67_CONSERVER
      WHERE cd.consommateur_id = :P67_SUPPRIMER;
    
      l_rowcount1 := SQL%ROWCOUNT;
    
      DELETE FROM cons_consommateur cc
      WHERE cc.id = :P67_SUPPRIMER;
    
      :P67_ROWCOUNT3 := SQL%ROWCOUNT;
      :P67_ROWCOUNT := l_rowcount1;
      :P67_ROWCOUNT2 := l_rowcount2;
    
    EXCEPTION
    
      WHEN OTHERS
      THEN
        ROLLBACK;
        :P67_MESSAGE_ERREUR := SQLERRM;
    
    END;
    

    Please use--------.

    ...\
    

    Labels to preserve the formatting of the code.

  • How to make a 'yes' or 'no' radio button in a single page and "sync" the two to another page?

    Hello

    How the option button mirrored the choice made on page 3 of the 10 page? Thank you.

    Page 3:

    Page 10:

    Simply copy the fields from one page and paste them into the other. Just do

    of course, you check the option that says "buttons with the same name and choice".

    are selected in unison"under properties, Options tab.

  • I have CS5.  Cannot install updates.  The update process runs, but once finished, I get an error message that the update could not be installed.  I have a Dell PC with 8 GB ram and 2 TB of storage.

    I have CS5.  Cannot install updates.  The update process runs, but once finished, I get an error message that the update could not be installed.  I have a Dell PC with 8 GB ram and 2 TB of storage.

    The latetest (cloud) update sometimes does not work with old programs... Try to install your updates manually

    Beginning of the updates here and product selection, read to see if you need to install updates in the order of the numbers, or if updates are cumulative for the product http://www.adobe.com/downloads/updates/

  • C6180: To avoid damage, use the power button / shutdown - message does not disappear and the printer is looping

    I have problems with my printer since arriving to a new home. I stop the printer before removing the cable, but seems could have pulled the power cable earlier than closing down.

    Since that time, the printer is looping with message "to avoid damage to use the off button /...» "- How do I stop and work again.

    Please help!

    Thank you.

    Heck!

    I was really hoping that would not be the issue.

    So, if I understand it, the question you receive looks like this;

    "It lights up and shows the HP logo and process bar animation for one minute, followed by the message:"abnormal termination. "  To avoid damage use on the button to turn off the printer.  Do not use a wall or the band switch to close.  Press OK.  Then he stops and leaves upward. »

     

    Try this:

    1. If the printer is still on, unplug all rigid and flexible cables at the back of the printer.

    2 unplug the power cord also from the wall...

    3. wait for two minutes.

    4 reconnect the power cord to a wall outlet first.

    5. hold the pound (#) and six 6 buttons.

    6. all by pressing the two buttons, reconnect the power cord to the back of the printer and at the end of two seconds, exit book and six buttons.

    7. turn on the printer if it goes out...

    Third times the charm, right? * fingers crossed *

     

  • Problem of setting a value for the hidden item click on the button with processes action or pl/sql dynamic

    Apex 4.1

    Oracle 11g

    I have a page which consists of a main and several sub-regions area.  I have a pl/sql process in after the header SET_DISPLAY(:P400_DISPLAY:='MAIN';))

    Three subregions have a contional show where P400_DISPLAY = STORE.  It works in the hiding of the sub regions.

    Now, I want to change the value P400_DISPLAY to the STORE to show the subregions when I hit a button.

    I tried to create a dynamic action for the click on the Add button, but get the following error:

    The selected button uses a model of 'button' that does not contain the #BUTTON_ID substitution string #.

    I went to the models and found:

    Substitution strings

    Top

    Substitution strings are used in sub models to reference the value of the components. This report details use of string substitution for this model.
    Substitution string Referenced De Description
    #LINK #.YesModelTo be used in an attribute "href".
    #JAVASCRIPT #.NO.To be used in an "onclick" attribute
    #LABEL #.YesModelButton label
    #BUTTON_ATTRIBUTES #.NO.The attributes button
    #BUTTON_ID #.NO.ID generated button will be ID either the static button if defined, or if not will be a generated ID internally in the format 'B ' | [Internal ID of the button.

    I then tried to create a page process, pl/sql,: P400_DISPLAY: = 'STORE '; If the button is pressed.  The action of the button is submit page. However, it does not change the value of P400_DISPLAY and the subregions are hidden.

    Suggestions please on how to fix the template or change the value of P400_DISPLAY?

    The question of the root, it's that, even if you change the value of the element of your page, it is not visible to other areas of the page until it is in the session. Thus, any other action based on the value of the element of your page. the visibility of a control, a report based on the value of the item, etc. will be affected by changing the value of the item page until it has been changed in the session. Even after that, items are stored in the session, then you must do something to influence the revalued value. To see the effect of this, observe that your page will load and assesses the value of the element of your page, it sees which is the "MAIN" and mask areas. However, he didn't reassess after that.

    Then; your choices for this value set at the session are send the page, or use JavaScript to set the value in the session. If you use the latter, you will have to do extra work to make visibility tests be re - run, so, let's stick with the submit method.

    What you did above sounds correct to do this but, there are a lot of decisions, that you might have done that may have caused things to do not occur in the correct order.

    First of all, we will confirm that what I describe above is your problem. From the development environment, load the page, click on the button to change the value and submit. Now, click on the link marked the Session. He is always at HAND? If the answer is "Yes"; That's your problem.

    Let's start with your calculation after the header. You set it to * only * run if the current value of the element of your page is null? If this isn't the case, it's your problem.

    Load the Page-> Item set to 'Hand' by calculation-> click on the button--> Item set to STORE-> Submit-> Page Load-> point by calculating the value 'hand '.

    See the problem?

    Assuming that's not the question, you have created a branch to the same page, right? What is your process for the branch point? Is it * after * Validation, computation etc.? Because if not, you are not changing the value before that didn't get to submit.

    I bet that's the first question, but take a look at these.

    See you soon,.

    -Joe

  • How to clone disk HARD of backup/restore for ideapad with pre-installed win8 and recovery button work?

    Hi all

    I recently bought a y510p ideapad. It came with pre-installed win8, and I have no recovery CD. I intend to play with linux on this laptop, but do not want to lose win8. So before I have potentially immediately reformat, I think to make a copy of clone of my HDD on an external USB drive. The general plan is like that,

    1. make a copy of mobile on external USB HARD drive

    2 mud with linux - and foolishly autour reformat the entire process

    3. have fed up with linux and want to return to windows

    4 copy of retrospective data from usb driver external HDD latop

    5 return to the comfort of win8

    With the help of this tool (clonezilla) will work in the above scenario?

    http://www.MakeUseOf.com/tag/free-advanced-hard-drive-cloning-solution-from-Clonezilla/

    If not, are there any other alternatives (free if all goes well) I could use?

    My intention with the backup, is that after that I have 'restore' things, "a key recovery" button should continue to work as before.

    -Abraham V.

    AbrahamV wrote:

    Hi all

    I recently bought a y510p ideapad. It came with pre-installed win8, and I have no recovery CD. I intend to play with linux on this laptop, but do not want to lose win8. So before I have potentially immediately reformat, I think to make a copy of clone of my HDD on an external USB drive. The general plan is like that,

    1. make a copy of mobile on external USB HARD drive

    2 mud with linux - and foolishly autour reformat the entire process

    3. have fed up with linux and want to return to windows

    4 copy of retrospective data from usb driver external HDD latop

    5 return to the comfort of win8

    With the help of this tool (clonezilla) will work in the above scenario?

    http://www.MakeUseOf.com/tag/free-advanced-hard-drive-cloning-solution-from-Clonezilla/

    If not, are there any other alternatives (free if all goes well) I could use?

    My intention with the backup, is that after that I have 'restore' things, "a key recovery" button should continue to work as before.

    -Abraham V.

    Make the plan will cause OKR is not functioning properly. To prove this to get a hard drive of exact size and make a clone of hard disk of the device. Remove the hard drive from the unit and place the disc clone hard inside. You can now play with the disk hard clone to your hearts desire but OKR first test if it still works. Even if OKR no longer work, you can proceed with the installation of linux. Once you're disgusted with Linux everything you have to do is replace the hard disk clone with the original hard drive and you're back to win with OKR 8 still works.

  • Repeated message: Windows - No disk "Processing Message c0000013 parameters 75b6bf7c 4 75b6bf7c 75b6bf7c Exception", I have to reboot to remove and it returns. How can I fix it?

    I get this repeated error message: Windows - no disk "Processing Message c0000013 parameters 75b6bf7c 4 75b6bf7c 75b6bf7c Exception" I cancel and it returns immediately. I can't emove it unless I reboot.  And then he returned. How can I fix it?

    It's a shame that we don't know anything about your system, because that would of course make things easier.

    So I'll just take a stab at it and offer this idea in general use for this message:

    If you don't see a message like this:

    No disk, Exception Processing Message c0000013 parameters 75b6bf7c 475b6bf7c 75b6bf7c

    Until you can determine what the 'real' problem is with your hardware, you can disable the pop-up message by making a registry adjustment.

    Before making changes to the registry, back up your registry with this free and easy to use tool popular:

    http://www.SnapFiles.com/get/ERUNT.html

    Click Start, run and enter in the box:

    Regedit

    Click OK to open the registry editor, navigate to the following key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows

    In the right pane, check the value of the ErrorMode setting.

    If ErrorMode is set to 0, double click on ErrorMode and set the value to 2

    (2 = off).

    Click OK to save the changes, and then click file, exit to close the registry editor.

    Reboot your system and check the things now.

    2 to the parameter ErrorMode stops at pop - up message but still material error log in the Event Viewer log.

    http://support.Microsoft.com/kb/124873

  • I get a message that Generic Host Process for Win 32 Services has encountered a problem and needs to close. How can I get rid of this? It freezes everything up.

    I don't really know what the good topic for this problem.  I get the message that Generic Host Process for Win 32 has encountered a problem and needs to close.  I need to get rid of it because it freezes everything up.  No matter if I send or not send the message to Microsoft.

    Hi ArdythPhillips,

    ·         Exactly when you receive this error message?

    ·         You did it of any material changes or software on the computer before this problem?

    This problem may occur if you use an old HP printer driver or an old HP scanner driver.

    If you are using an HP printer, you can follow this link.

    Generic host process error message and a flashlight icon appear

    To improve the performance of the computer, you can follow this link & check if it helps.

    Restore the performance of your computer with Windows XP

    Hope the helps of information.

    Please post back and we do know.

  • How do a success message appears after a process completes successfully with a corporate theme


    Hello.

    I have Oracle Apex 4.0 and Oracle 10

    The problem is that the doesn´t of success message appears when the process ends.
    The cause is because I have a corporate theme and if I change the 'Model of Application default level' page template for another page, for example "a level tab sidebar left' model, the message is displayed correctly, but there is a menu of list and it appears so when the mouse passes over a picture, and if I choose the second model the menu disappears.

    What could I do for the two displayed?

    Thank you.

    Hi Vilela,

    Vilela says:

    Hello.

    I have Oracle Apex 4.0 and Oracle 10

    The problem is that the doesn´t of success message appears when the process ends.
    The cause is because I have a corporate theme and if I change the 'Model of Application default level' page template for another page, for example "a level tab sidebar left' model, the message is displayed correctly, but there is a menu of list and it appears so when the mouse passes over a picture, and if I choose the second model the menu disappears.

    What could I do for the two displayed?

    Thank you.

    If please mention the topic from which you created the custom theme, or is it a custom built theme.

    Please change your Page template-> sub-model section-> success Message. View the section HTML markup.

    Please view the 'Body' of the Page template section HTML markup as well.

    If the 'success' Message contains the correct markup (to compare with 'A level tabs - left Sidebar'), then compare the 'Body' of the model section and make sure she has the #SUCCESS_MESSAGE substitution string # after the header tag.

    You can ask for help on issues of the HTML and the template more than whoever designed your model.

    I hope this helps!

    Kind regards

    Kiran

  • Updated my iPhone 5 ios 9.3.3 and problems with messaging

    Many of my applications were unusable, unless I upgraded (it has been a long time) but when I did all my old messages disappeared. And if that wasn't bad enough when I now get a message there is no notification. AND the content of incoming or outgoing messages will disappear in 1-2 hours. Just left with the name or phone number. I thought I the phone turned off and save but which only made it worse. Even the name / # disappeared. I am a foreigner and I am relying on texting but looks like I made a big mistake. These problems appear in beta? Googling - it's a known issue. Makes me want to never be updated again! Help!  I'm still traumatized from upgrading my MacBook Pro and lose iPhoto. Not impressed by the sign (less) Photo.

    Travel-Shotz wrote:

    ... unless I upgraded (it has been a long time)

    If you updated / upgrade every time new Apple software have been revised, you would probably avoid many of your questions.  You would replace it with several small updates / upgrade for a huge.

    So that's my advice for the future.  One thing you can also do right now is to check the settings > general > storage & use iCloud > manage storage (under storage) and make sure that you have absolutely no less than 10% of the total free storage of your device.

Maybe you are looking for

  • Satellite A505 breaks down

    This laptop has begun recently to close (as it would if I pressed the power button) for no apparent reason.I suspect that it is because it is overheating, but there were a couple times when he did it in a few minutes of starting with nothing else run

  • Satellite M70-192: its not strong enough

    Hey! I have a little problem with my sound on Satellite M70 - 192 PM760, when I plug the cable jack instead of phones, and second shot (on the same cable) to the hi-fi unit the sound is not loud enough. The sound is 2 times more silent, then it shoul

  • Re: Sat Pro A10 and Sat 10 - the difference - need new keyboard

    Hey all! New ID as I am garbage to remember the passwords/log on emails... I have a Satellite Pro A10, which needs a new keyboard - there's loads are circulating on ebay for Satellite A10 - but not the Pro - now I'm almost 100%, it'll be the same key

  • Recovery, password Bios COMPAQ PRESARIO CQ61

    Hello I have a COMPAQ PRESARIO CQ61 and suddenly asks me the password of the bios. The message that appears is "ENTER password or POWER ON PASSWORD". What can I do? After failing 3 times I get the message "System disabled" and the code 73585421. See

  • disable the on-sreen keyboard

    How can we disable the on-screen keyboard?