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

Tags: Database

Similar Questions

  • 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.

  • How to call function of a process Page PL\SQL Javasrcipt

    Hello

    I have a javascript function say - function1 () defined in the Page header.
    I have a page PL\SQL process after the header.

    How can I call the javascript function - function1 () - of PL\SQL Page process.

    Thank you
    Deepak

    Hi Michael,

    I have a page PL\SQL process after the header.

    Since it's after the header (in the rendering phase) process, I think that this will call the JS? Please correct me if I'm wrong :-)

    See you soon,.
    Hari

  • Report popup of a proc from PL/SQL?

    Hello

    I tried to find an answer without success... I have a procedure (calle by a button) which has:
    ...
    EXCEPTION
    WHEN MORE_THAN_ONE_ROWS THEN... open a report of the Apex in a new window



    How can I do this?

    Thank you

    Use this updated the JS

    
    
  • How to show a popup (confirm) dialog box as well as exec warning a proc

    I would like to have a confirmation popup dialog box display whenever a user chooses to delete a record. I understand how to do this, but I don't know how to have a stored procedure to run after the user selects ok in the dialog box.

    How can I get a stored procedure to run after the user confirms that this is indeed what they want to do in the dialog box?

    I have this in the JavaScript page-> service and the Global Variable declaration section:
    var htmldb_delete_message = ""DELETE_CLASS_CONFIRM_MSG "";

    The button Delete is the value of action-> URL redirection
    JavaScript:apex.confirm (htmldb_delete_message, 'DELETE_CLASS_CONFIRM_MSG');

    The process of the stored procedure is set to run to submit with the button Delete.

    Right now, nothing is happening when they confirm the popup dialog box. If I get the popup dialog, removing works very well, but (of course), the user can accidentally do something they don't want.
    Thank you very much
    Reid
    Request Express 4.0.1.00.03

    Hey Reid,

    The second parameter in the call to confirm is not supposed to be the message again - this is supposed to be the value to the APPLICATION. If you would like to be, "DELETE_CLASS" and then you would make your conditional removal on request = DELETE_CLASS process.

    Hope this helps,
    John

    If you find this information useful, please do not forget to mark the 'useful' or 'correct' post so that others benefit as well.

  • Task Manager Windows 'show all processes from all users' will not work

    Hi im running service of 64 bit vista Home premium pack 2

    For some reason any button "show all processes from all users" in the Task Manager will not work, when I click nothing happens, uac prompt little or nothing.

    I can end processes very do well no problem it's just the show all button that does not work, I thought that maybe the taskmgr.exe in my right-click system32 folder and compatiability tab and running it as admin it would work, but the compatiability tab is completely grayed out all I can't click anything in it.

    Im not a big computer wiz, but I checked my user accounts account im logged on says that it is the administrator and UAC is on.

    On a side note do not know if this has nothing to do with my problem but recently my computer has got contracted a Trojan horse that has infected the mrt.exe file, I had to delete, now I get an error during windows startup associated with mrt.exe works not properly. any suggestions how to solve this problem too

    Hello

    Make sure that the malware is removed completely

    Download update and scan with the free version of malwarebytes anti-malware

    http://www.Malwarebytes.org/MBAM.php

    You can also download and run rkill to stop the process of problem before you download and scan with malwarebytes

    http://www.bleepingcomputer.com/download/anti-virus/rkill

    If it does not remove the problem and or work correctly in normal mode do work above in safe mode with networking

    Windows Vista

    Using the F8 method:

    1. Restart your computer.
    2. When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap theF8 key repeatedly until you are presented with theBoot Options Advanced Windows Vista.
    3. Select the Safe Mode with networking with the arrow keys.
    4. Then press enter on your keyboard to start mode without failure of Vista.
    5. To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
    6. Do whatever tasks you need and when you are done, reboot to return to normal mode.

    _____________________________________________________________________

    also run the sfc/scannow command.

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

    Use the (SFC.exe) System File Checker tool to determine which file is causing the problem and then replace the file. To do this, follow these steps:

    1. Open an elevated command prompt. To do this, click Start, click principally madeprograms,Accessories, right-clickguest, and then clickrun as administrator. If you are prompted for an administrator password or a confirmation, type the password, or clickallow.
    2. Type the following command and press ENTER:
      sfc/scannow

      The sfc/scannow command analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions

    How to analyze the entries in the log file generating the program Checker (SFC.exe) resources of Microsoft Windows in Windows Vista

    http://support.Microsoft.com/kb/928228#appliesTo

    If SFC detects the main problems it can't fix you may need to borrow a Microsoft dvd vista not an acer, HP etc. recovery disk and do a repair installation

    read the below tutorial on how to perform a repair installation

    http://www.Vistax64.com/tutorials/88236-repair-install-Vista.html

  • JavaScript is not called by the process of PL/SQL

    Hello Experts

    I try to call a javascript function from pl/sql using htp.p process, but javascript does not get mentioned. In fact, my requirement is as follows:-

    I have a report with check boxes. I use apex_application.g_X01.count to loop through the boxes and check the values of the report. If all of the checkboxes are selected, then I want to show a confirmation box so that the user can confirm that they want to go ahead and do the follow-up actions.

    My Javascript function that I placed it in the HTML header and the Body attribute is:-

    function confirm_response()
    {
    var answer = confirm ("test", "Confirm");
    If (response)
    {
    $x('P1_FLAG').value = 'Y ';
    }

    }

    Looks like my pl/sql process, which currently is trying to evoke the javascript: -.

    Start
    IF apex_application.g_f01.count = < < a number > > THEN
    HTP. P ("< script type =" text/javascript"> ');
    HTP. P ('confirm_response()');
    HTP. P ("< /script >" ");
    IF: P1_FLAG = 'Y' THEN
    -Continue with follow-up actions
    ON THE OTHER
    -To get out the process of
    END IF;
    END IF;

    end;

    But when I run the present that it does not work. The confirmation box never appears.

    It does not even if I change the PL/SQL process as below: -.


    Start
    HTP. P ("< script type =" text/javascript"> ');
    HTP. P ('confirm_response()');
    HTP. P ("< /script >" ");
    end;

    Can someone please advice.

    Thank you

    Hello
    >
    It does not meet my needs because I want first of all check if all the boxes are ticked, then only run javascript.
    >

    So how count the boxes checked in JS is the question.

    Continuing to your operation code snippet, you have box f01.

    Modify the script in the HTML header to this

    
    

    See you soon,.

  • I can't find the button 'action' to have my photos deleted from my iphone after import is complete.

    I can't find the button 'action' to have my photos deleted from my iphone after import is complete.

    When you import the and with what application?

    If you use the new pictures check box in the import window, as shown in this screenshot:

    If you're still using iPhoto then is that you say not to remove from the iPhone until you start the import process.  This window will open so you can choose whether or not to remove it from the iPhone:

    Finally, if you use Capture picture to import your photos the box will be in the lower left corner of the window:

  • The Windows Task Manager - showing processes from all users

    Is it possible to get the Windows Task Manager to view all default processes?

    When the system is running very slowly it's a great nuisance to have to activate the "show processes from all users' the after you have opened the TM and waste valuable time in the process identifying guilty.

    Winston

    Hello

    I don't know of a way well there could be a... Here are some tips of perfomance and tools that can
    also be used as a troubleshooting tool.

    I just realized that if UAC is disabled him show all users remains active.

    ----------------------------------------------------------------------------------

    Process Explorer can be very useful for you.

    Be careful that a lot of these programs and services really need run and often remove some fact little
    at the speed of the machine while making the less easy to use machine.

    Optimize the performance of Microsoft Windows Vista
    http://support.Microsoft.com/kb/959062
    How to troubleshoot performance issues in Windows Vista
    http://support.Microsoft.com/kb/950685

    How to troubleshoot a problem by performing a clean boot in Windows Vista
    http://support.Microsoft.com/kb/929135

    To see everything that is in charge of startup - wait a few minutes without doing anything - then right click on the task - bar
    The task manager - take a look at stored by - Services - process - it is a quick reference (if you have
    a small box in the lower-left - show for all users can check only).

    How to check and change Vista startup programs
    http://www.Vistax64.com/tutorials/79612-startup-programs-enable-disable.html

    A quick check to see that load method 2 is - using MSCONFIG and then display a list of the people here.

    Method 1 using Windows Defender will tell you more specific information about each program.

    ---------------------------------------------

    It's a little more complicated that you might have a few running services that you can do without.

    Also some programs add services that might not really need to start automatically.

    To see these compare these in Start - type in the search box-> find Services at top right click on RUN AS ADMIN as the default Vista as shown here by BlackViper. Ignore and who are disabled (which do not run) or manual (which work only on request) - for any automatic or automatic delayed start you can post them here if you need help to decide if you should run. Some of these can be assigned to the stop and
    Manual if the program calling can run them as needed.

    BlackViper made also some improvements to default windows services but I wouldn't do those unless you
    really understand the full meaning of change a default service. Then use it as a tool to compare.

    Windows Services - list by default.
    http://www.blackviper.com/WinVista/servicecfg.htm

    WhatInStartup - free - disable/enable/remove of programs at Windows startup
    http://www.NirSoft.NET/utils/what_run_in_startup.html

    -----------------------------------------------------------

    Here are some tools that will help:

    Window Watcher - free - do you know what is running on your computer? Maybe not. The window Watcher says it all, reporting of any window created by all running programs, if the window is visible or not.
    http://www.KarenWare.com/PowerTools/ptwinwatch.asp

    Many excellent free tools and an excellent newsletter at Karenware
    http://www.KarenWare.com/

    Process Explorer - free - find out what are the files, registry keys and other objects processes have opened, the dll
    they loaded and much more. This exceptionally effective utility will show you even owned by each process.
    http://TechNet.Microsoft.com/en-us/Sysinternals/bb896653.aspx

    Autoruns - free - see what programs are configured to startup automatically when your system boots and you
    opening of session. Autoruns also shows you the full list of registry and file locations where applications can configure auto-
    start the settings.
    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx
    Process Monitor - Free - monitor the system files, registry, process, thread and DLL real-time activity.
    http://TechNet.Microsoft.com/en-us/Sysinternals/bb896645.aspx

    There are many excellent free tools from Sysinternals
    http://TechNet.Microsoft.com/en-us/Sysinternals/default.aspx

    WhatsInStartUP - free - this utility displays the list of all applications that are loaded automatically when Windows
    starts. For each request, the following information is displayed: Startup Type (registry/Startup folder).
    The command - line String, product name, file Version, company name, location in the registry or the file system,
    and much more. It allows you to easily disable or remove unwanted programs that runs in your Windows startup.
    http://www.NirSoft.NET/utils/what_run_in_startup.html

    There are many excellent free tools to NirSoft
    http://www.NirSoft.NET/utils/index.html

    Hope these helps.

    Rob - bicycle - Mark Twain said it is good.

  • Restart the process from another App Engine user

    I am a DBA and I want to restart and engine of the user process final app whose execution is unsuccessful. I have the process scheduler administrator and PeopleSoft administrator roles, however I still cannot restart AE.

    What other guarantees is needed for this?

    Based on your response, I'll assume that you also have some knowledge of the application (which may not be not DBA).  Since you ask, I'll also assume that the reboot option button is not available in the process monitor.

    You should not have other roles.

    What happens if you try to restart it from the command line?

  • Launch a process from space webcenter

    Hello

    I am a newbie in SOA, I'm just trying to create a workflow to request time off with SOA suite, which as a result of the steps
    1. request for employee portal
    2. approval of the Manager
    3. inform the employee.

    To do this, I created a SOA project in Jdeveloper and deployed in SOA suite.
    My problem is: How can I start this workflow of the webcenter space?
    What are the methods to start the SOA process from space webcenter?



    Concerning
    Hamani

    each 'process' is exposed by default through a service, with binding.ws (which is a Web service port). After the deployment of the composite, this service can be called via SOAP/http

  • Call an HTML page directly from the page of the OFA.

    Hello
    I have a customer requirement to call an HTML page directly from my page of the OFA. The HTML page is the home page of their business and in my OAF page whenever the Cancel button will be squeezed user will be redirected to the HTML home page.
    Is someone can you please tell me how I can get this feature.

    Thank you
    Lucile

    R11 I have pageContext.sendRedirect (url) of the user; to achieve this.

    Kind regards
    Out Sharma

  • Hello from Firefox can be used for three or more way call or is it only from person to person?

    Hello from Firefox can be used for three or more way call or is it only from person to person?

    Hi awilcox Hello firefox time can only be used for a direct conversation between two people.

  • How to make a call on my iPhone 6 from Europe to North America?

    How can I make a call on my iphone 6 from Europe to North America?

    Is it a phone with a North American carrier?

    In general:

    Dial the international code for the country you are in, then enter the North American number with good country and area code.

    That is to say. 00 1 860 555 5555 will pay a call from the United Kingdom to a phone at the Bristol, Connecticut, USA.

    00 52 55 xxxx xxxx will place a call from the UK to a phone in Mexico

    00 1 647 xxx xxxx will place a call from the UK to a phone in Toronto, Canada

    (a)  (b)  (c)     (d)

    a U.K. international exit code

    b code

    c-indicative regional city

    number d.

  • When I log on, a popup saying "host process for windows services has stopped working" How can I get rid of him?

    When I log on, a popup saying "host process for windows services has stopped working" How can I get rid of him?

    Original title: the process host

    How to perform a clean boot in Windows:
    (solve a problem by performing a clean boot in Windows Vista, Windows 7 or 8)
    http://support.Microsoft.com/kb/929135

    Perform a clean boot to determine if background programs are interfering with your game or other programs
    http://support.Microsoft.com/kb/331796

    One by one add back an application both in the boot list to find the offending software application that causes the message "host process for windows services has stopped working" is displayed...

    J W Stuart: http://www.pagestart.com

Maybe you are looking for