Call the Javascript htmldb_delete_message PL/SQL procedure

Hi guys,.

I am a novice when it comes to JavaScript; I've written a PL/SQL procedure that removes multiple records based on a primary key:

PROCEDURE clear_alterations (p_eco IN VARCHAR2)
IS
BEGIN
DELETE FROM xxmel_apex_eco_alterations
WHERE the eco = p_eco;
END clear_alterations;

I can run it directly from a normal button, but I want the pop htmldb_delete_message dialog box to confirm whether to delete or not. When the user clicks "OK" I want the file to delete and cancel, do nothing.

I have managed to get the confirmation box appears, but cannot see how to call the PLSQL based on the OK"" button.

Any help would be great,
Thank you
Chris

Hello

Set your target URL button

javascript:confirmDelete('Delete record?','DELETE_REC');

Then create processes that call your procedure and define the process conditional request DELETE_REC

Kind regards
Jari

Tags: Database

Similar Questions

  • How to call the javascript function in ADF

    I have the javascript function stored in a .js file external (try to reuse in another application). How can call the javascript function for an event of ADF faces component. I need to I am a newbie to ADF, all ideas are appreciated.

    Kind regards
    Surya

    Published by: sgodavar on Sep 24, 2010 11:44

    Include JavaScript to the jsff/jspx as page:

    Call it like:

    Type = "dblClick" / >
    Amit

  • Use about Central button mouse to call the JavaScript function question

    I want to use the mouse middle button to call the function JavaScript (< a href = "javascript:help ()" >) help() opens a new window and directly to the Help Page of my GUI, but when I click on it with the middle button, it will open new tab blank Page that url = "javascript:help()"; " can't help executive function... What is a Firefox Bug or a correct behavior in Firefox? I thank.

    You must use left click to manage JavaScript links.

    See also http://kb.mozillazine.org/browser.link.open_newwindow.restriction

  • Error when you try to call the Javascript function in the ActiveX Web browser

    I have a requirement to call a Javascript function in a web page that is displayed in the browser's ActiveX control.  I have the control on the front panel, and I use the Navigate method to call to the top of the appropriate page.  Based on an example, I found, I'm trying to get a reference to the HTML Document so that I can then get a reference to the Fenetreparent.  There is a method of the HTML Window object called execScript who I'm calling.  See the attached image of the code (reference close calls do not appear, but when I run it, they are there).

    I can't the node property that returns the parentWindow reference.  The error I get is the following.

    Error-2147467262 LabVIEW: (Hex 0 x 80004002) No. taken such interface supported.

    Any ideas on where to go from here?

    Hello

    I have reproduced the issue and the error you are seen and tried to understand what is the solution.

    It seems that the problem is with getting the pointer to the parentWindow.  From what I read on MSDN, it's maybe a limitation in the use of an ActiveX control in LabVIEW. It seems like Internet Explorer creates the object of the window, and so opening in one ActiveX control you free access to this top-level object.

    Here could be workaround for javascript execution in your program:

    I would like to know if it works for you and if it will work in your program.

  • Flash cannot call the javascript function in the local html file

    Hello!

    Us is to develop our first application on Playbook. It is an html file including a flash file and javascript code. Everything is packed in. in the file bar, a config.xml file and has been correctly loaded into the Playbook. Everything works locally (no web access)

    Everything works well except when we use an ExternalInterface.call("saveglobalscore",score) in flash that calls a javascript function in the .html file.

    In the actionscript3, we selected the "authorized local file access" and put the 'Security.allowDomain("*) '.

    Any ideas? Thank you!

    External interface tries to access the files packaged locally is currently a known issue.  I have not really of a calendar when or if this can be resolved.  It may be in the code base of flash.

  • Call the JavaScript file java class in the native blackberry development.


    What you are looking for is the ScriptableFunction class.

    You can extend the script engine of a JavaScript object name to a ScriptableFunction Java class mapping.  In this example, if you called foo. JavaScript bar(), the BrowserField would facilitate a call to the invoke() method defined in the MyScriptableFunction() class:

    protected BrowserField _browserField   = null;
    _browserField = new BrowserField();
    _browserField.extendScriptEngine("foo.Bar", new MyScriptableFunction());
    

    Then you set your ScriptableFunction class like this and fill it with some Java code, you need.  Note: it only accepts strings as input parameters.

    import net.rim.device.api.script.ScriptableFunction;
    
    /**
     * @description Demonstration of using the ScriptableFunction class added to version 5.0 of the BlackBerry Device
     *              Software
     * @version 1.0
     * @author Adam Stanley, Developer Relations
     * @category BlackBerry BrowserField Development: ScriptableFunction API
     * @see http ://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/script/ScriptableFunction .html
     */
    
    /**
     * This class can be used to represent a function in the JavaScript environment.
     */
    public class MyScriptableFunction extends ScriptableFunction
    {
    
        /**
         * User has invoked this ScriptableFunction from the JavaScript engine This example shows how to open the Messages
         * application and create a new message
         */
        public Object invoke(Object obj, Object[] args) throws Exception
        {
            if (args.length == 3)
            {
    
                String param1 = args[0].toString();
                String param2 = args[1].toString();
                String param3 = args[2].toString();
    
                //Do something
            }
            return Boolean.TRUE; //Always
        }
    
    }
    

    Hope that helps.

  • ExternalInterface call the Javascript to AS2 array throwing error undefined

    I need to pass various (follow-up) IDs to a .swf.  the IDS are in a table like this =

    < script type = "text/javascript" >

    function getImpID() {}

    var medID = {impID: pvID '12345': ' 677890', exID: '654332'};

    return medID;

    };

    function thisMovie (banner) {}

    If (navigator.appName.indexOf ("Microsoft")! = - 1) {}

    Returns the window [banner]

    }

    else {}

    return the document [banner]

    }

    }

    Window.OnLoad = getImpID;

    < /script >

    For now, the AS2 I is:

    flash.external import. *;

    System.security.allowDomain (sourceDomain)

    var allID:String = ExternalInterface.call.apply ("getImpID");

    function getIDs() {}

    var impID:Number;

    var pvID:Number;

    var exID:Number;

    var id_arr:Array = allID.split(",");

    _root.id_test. Text = impID;

    }

    getIDs();

    Basically, what I need is to divide the three identifiers from the javascript so that I can add with different URL clickTags in the will.  I primarily the "undefined" error, so I'm going out on a limb here I have the AS2 does nothing now value.  More big scratcher head for me is, if I have the ID in an array in javascript (medID) how do I get them not only correctly in Flash, but separate them in their separate identity papers.

    Any suggestions would be greatly appreciated.

    Thank you!

    I forgot to answer, your tips have helped solve the puzzle =

    ActionScript:

    function idTag() {}

    getID = Object (ExternalInterface.call("saveglobalscore",score) ("getImpID"));

    getID.toString ();

    _root.id_test. Text = getID;

    }

    idTag();

    JavaScript

    has worked like a charm!

  • Call the javascript function using parameters cause run an immediate dependant

    Hello.

    I saw a strange behavior, if I try to use javascript parameters in the method af:clientListener property.

    Using the syntax
     <af:commandButton text="Init" id="cb1"
       partialSubmit="true">
       <af:clientListener method="OnInitControl1" type="click"/>
    </af:commandButton>
    and javascript
    function OnInitControl1() {
      alert('OnInitControl1 called');
    }
    the method oninitcontrol1 is called first with the click of the button.

    But with the syntax
    <af:commandButton text="Init" id="cb1"
       partialSubmit="true">
       <af:clientListener method="InitCtrl('Control1')" type="click"/>
    </af:commandButton>
    and javascript
    function InitCtrl(frameName) {
      alert('InitCtrl(' + frameName + ') called');
    }
    the InitCtrl function is called immediately to the loading of the page.

    In both cases, the javascript file is inserted into the use of af: document
    <af:resource type="javascript" source="/ScriptHelper.js"/>
    Is my "method" of the af property syntax: clientListener the problem?

    Paul.

    Paul,

    I don't know if you can call javascript with parameters in the way that you are currently using. However, have you tried using an af:clientAttribute and enhance the javascript?

    Check the operating instructions by Frank on the related topic.

    http://www.Oracle.com/technology/products/jdev/tips/fnimphius/passingAdditionalArgumentsToClientListener.html

    Arun-

  • Call the javascript function by hovering the mouse over the tab

    Hi all
    I have an application with a level tabs. I want to call a javascript function to the mouseover of the standard tab please help as soon as possible.

    Thanks in advance

    Hello

    Go to the page template and scroll the tab Standard attributes. In my current theme which has a line that looks like this...

    #TAB_LABEL##TAB_INLINE_EDIT#
    

    You could change this

    #TAB_LABEL##TAB_INLINE_EDIT#
    

    Or make reference to a function that you included in the header.

    Alternatively, you can make the same change to no current tab.

    Is that what you mean?

    See you soon

    Ben

    Published by: Munky on January 14, 2010 11:34

  • Need to call the javascript function when the page is loaded

    Hello - I have a javascript function defined on Page 0 of my application. It is in the source of an unconditional
    region whose view point is after the header.

    I call successfully the function of event onchange on individual page elements. (The function
    sets the value of an element based on the value of another).

    But I also need to call the function when the page is loaded. The page is a form of data modification,
    so many values is filled when it is loaded, and I need the dependent values populated
    also.

    I tried to add the call to function in the following way. It is not at all get called (alerts are not forthcoming)
    and there is no error in the Firefox error console...
    - as an event onload in individual items
    -call directly to the edit HTML page header
    -call directly from the HTML body of the edit page (which, from what I've read, sounds
    as to execute onload and my page template doesn't have a defined substitution onload string).

    In these 2 cases, I simply call it like: jsLookupValue ($v ("P8_OBJECTTYPE_ID"), "objecttype_id", "P8_OBJECTTYPE_NAME", "objecttype_name", "hdb_objecttype");

    How can I do this?

    Thank you
    Carol

    If you define the function on the zero page and any page you should be able to call using something like:

    
    

    Have you tried to put just a statement alert() on the page in order to check that it runs just about anything?

  • Need help with the compilation of PL/SQL procedure

    Hi people,

    Can someone help me with the following problem?

    Version: 10g Rel 2

    I create the following proc

    CREATE OR REPLACE PROCEDURE SYS. "P_SEND_MAIL"(p_message VARCHAR2).
    is
    Start
    UTL_MAIL. SEND ('[email protected]',
    message = > 'Oracle alert. "
    subject = > p_message);
    end;
    */*

    The above proc compile successfully

    Then I create a second proc that references the above proc

    CREATE OR REPLACE PROCEDURE SYSMAN. LOG_CRITICAL_ALERTS (gravity IN MGMT_NOTIFY_SEVERITY)
    IS
    BEGIN
    -Connect all the critical severities
    IF severity.severity_code in (MGMT_GLOBAL. G_SEVERITY_CRITICAL, MGMT_GLOBAL. G_SEVERITY_CRITICAL)
    THEN
    BEGIN
    SYSMAN.p_send_mail (Severity.message);
    EXCEPTION
    WHILE OTHERS
    THEN
    -If there is that no problem, then get the notification retried
    RAISE_APPLICATION_ERROR (-20000, "Please try again");
    END;
    COMMIT;
    END IF;
    END LOG_CRITICAL_ALERTS;
    */*

    I get the following compilation error

    SYSMAN PROCEDURE. LOG_CRITICAL_ALERTS
    Online: 8
    PLS-00201: identifier ' SYSMAN. P_SEND_MAIL' must be declared

    Thanks in advance

    rogers42

    One of the basic directions using Oracle, we should NOT, do not create your own procedures user SYS (or tables also). SYS is the datadictionary. That the datadictionary is changed automatically when importing, it is never exported: provided non-Oracle of objects are ignored.
    System: essentially the same question.

    Why you have this 'problem '.
    Just because you don't read the documentation and do not want to check for errors in the online documentation.

    Would you do that, you would have known
    SYSMAN would need to execute privilege
    You have put in place a public synonym.

    --------------
    Sybrand Bakker
    Senior Oracle DBA

  • Good way to call the JavaScript function

    I am launching a popup to size using the Captivate 1 javascript capabililties.

    My function is defined as follows:

    function popup1() {}
    var functions = 'directories = no, menubar = no, status = no, titlebar = no, toolbar = no, width = 742, height is 563';
    var mypopup = window.load event ("Fund sovereigns/dmatmp.html ', 'mypopup' features ').
    }

    Essentially, when the user clicks on the box, this function will strip the chrome, resize the popup window and load the page dmatmp.html. Pretty simple.

    In the javascript box, under run Javascript, I have the following question:

    onclick = "popup1 ()" "

    However, when I click on the link in Captivate, Internet Explorer opens a window then closes immediately. Firefox opens a tab and fill it with nothing.

    What is the problem?

    Matt

    jbradley88, your suggestion has ALMOST been the solution... I made your corrections and still had the problem.

    The code that I put in the "execute Javascript part ' of the clickbox was:

    JavaScript:popup1()

    No one who has documented anywhere, of course... nowhere I could find anyway.

    Anyway, problem solved.

  • Call the javascript of customized phase listener method

    Hey guys,.
    I am currently integrating an ADF with another web application custom application, for this - I wrote a custom listener phase and in its afterPhase() I need to call a javascript method, which will proceed with a treatment for me. For icefaces, we have something like com.icesoft.faces.context.effects.JavascriptContext.addJavascriptCall (facesContext, jsmethod); but I couldn't find something similar here in BAA. Advice/suggestions will be appreciated!
    Thanks in advance.

    Hello user,.

    Import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
    Import org.apache.myfaces.trinidad.util.Service;

    ExtendedRenderKitService service is Service.getRenderKitService (FacesContext.getCurrentInstance (), ExtendedRenderKitService.class);.
    Script of StringBuilder = new StringBuilder();
    script. Append ("alert ('hello from phase listener ')");
    service.addScript (FacesContext.getCurrentInstance (), script.toString ());

    I hope that's what you're looking for

    concerning

  • Create the file with pl/sql procedure

    Hi all

    I do not know how to create a file that will contain the data of the select statements. I'm leaving again in oracle and pl/sql, and I apologize in advance for the questions of the rookie.

    CREATE OR REPLACE PROCEDURE ECM_DATA.check_pad

    IS

    v_padron_check VARCHAR2 (50);

    v_padron_number VARCHAR2 (50);

    BEGIN

    SELECT count (pd.estado)

    IN v_padron_check

    OF par6.padrones_datos pd,.

    PAR6.padrones p,

    PAR6. Fechas f

    If pd.estado not in ('2000 ', 8000')

    AND PD. FILE = P.ARCHIVO

    AND P.FECHA = F.fech_s;

    DBMS_OUTPUT. Put_line ('Št. neuspešnih zapisov: ' | v_padron_check);

    FOR (IN) pad

    SELECT pd.archivo

    OF par6.padrones_datos pd,.

    PAR6.padrones p,

    PAR6. Fechas f

    WHERE the pd.estado not in ('2000 ', 8000')

    AND pd.archivo = p.archivo

    AND P.FECHA = F.fech_s

    )

    LOOP

    dbms_output.put_line (' Padrón št.: ' | pad.archivo);

    END LOOP;

    END;

    /

    Thanks for any help.

    Kind regards

    Robert

    Hi user8660054,

    If you want to create the file on the server where your DB is installed and then use that I provide you. It requires a DIRECTORY (with read/write privileges) to create.

    You can use my proc as below...

    Start

    generic_report_genrtr (p_query_in => ' Select * from user_tables ',)

    p_separator => ","-a comma separated values

    p_dir_in-online "nom_repertoire."

    p_filenm_in-online "OUTPUT_FILE_NM") IS

    end;

  • Use FOR... LOOP counter in the treatment of PL/SQL procedures with nest. Table

    Hi all!
    I learn PL/SQL on the book by Steve Bobrovsky (specified below, sample comes from it) and I have a question.

    In the procedure of the below specified program used a currentElement integer variable to get the reference to the line in the nested table of data type % ROWTYPE.
    Meanwhile, the program itself uses a common FOR... LOOP counter I have.
    DECLARE
     TYPE partsTable IS TABLE OF parts%ROWTYPE;
     tempParts partsTable := partsTable();
     CURSOR selectedParts IS 
      SELECT * FROM parts ORDER BY id;
     currentPart selectedParts%ROWTYPE;
     currentElement INTEGER;
     PROCEDURE printParts(p_title IN VARCHAR2, p_collection IN partsTable) IS
      BEGIN
       DBMS_OUTPUT.PUT_LINE(' ');
       DBMS_OUTPUT.PUT_LINE(p_title || ' elements: ' || p_collection.COUNT);
       currentElement := p_collection.FIRST;
       FOR i IN 1 .. p_collection.COUNT
       LOOP
        DBMS_OUTPUT.PUT('Element #' || currentElement || ' is ');
         IF tempParts(currentElement).id IS NULL THEN DBMS_OUTPUT.PUT_LINE('an empty element.');
         ELSE DBMS_OUTPUT.PUT_LINE('ID: ' || tempParts(currentElement).id || ' DESCRIPTION: ' || tempParts(currentElement).description);
         END IF;
        currentElement := p_collection.NEXT(currentElement);
       END LOOP;
     END printParts;
    BEGIN
     FOR currentPart IN selectedParts
     LOOP
      tempParts.EXTEND(2);
      tempParts(tempParts.LAST) := currentPart;
     END LOOP;
     printParts('Densely populated', tempParts);
     FOR i IN 1 .. tempParts.COUNT
     LOOP
      IF tempParts(i).id is NULL THEN tempParts.DELETE(i);
      END IF;
     END LOOP;
     FOR i IN 1 .. 50
     LOOP
      DBMS_OUTPUT.PUT('-');
     END LOOP;
     printParts('Sparsely populated', tempParts);
    END;
    /
    When I substituted a global variable of INTEGER type such for... The LOOP counter, an APEX have returned an error "ORA-01403: no data found.
    DECLARE
     TYPE partsTable IS TABLE OF parts%ROWTYPE;
     tempParts partsTable := partsTable();
     CURSOR selectedParts IS 
      SELECT * FROM parts ORDER BY id;
     currentPart selectedParts%ROWTYPE;
     PROCEDURE printParts(p_title IN VARCHAR2, p_collection IN partsTable) IS
      BEGIN
       DBMS_OUTPUT.PUT_LINE(' ');
       DBMS_OUTPUT.PUT_LINE(p_title || ' elements: ' || p_collection.COUNT);
       FOR i IN 1 .. p_collection.COUNT
       LOOP
        DBMS_OUTPUT.PUT('Element is ');
         IF tempParts(i).id IS NULL THEN DBMS_OUTPUT.PUT_LINE('an empty element.');
         ELSE DBMS_OUTPUT.PUT_LINE('ID: ' || tempParts(i).id || ' DESCRIPTION: ' || tempParts(i).description);
         END IF;
       END LOOP;
     END printParts;
    BEGIN
     FOR currentPart IN selectedParts
     LOOP
      tempParts.EXTEND(2);
      tempParts(tempParts.LAST) := currentPart;
     END LOOP;
     printParts('Densely populated', tempParts);
     FOR i IN 1 .. tempParts.COUNT
     LOOP
      IF tempParts(i).id is NULL THEN tempParts.DELETE(i);
      END IF;
     END LOOP;
     FOR i IN 1 .. 50
     LOOP
      DBMS_OUTPUT.PUT('-');
     END LOOP;
     printParts('Sparsely populated', tempParts);
    END;
    /
    When I tried to manage this code in SQL * Plus, the following picture emerged:
    Densely populated elements: 10
    Element is an empty element.
    Element is ID: 1 DESCRIPTION: Fax Machine
    Element is an empty element.
    Element is ID: 2 DESCRIPTION: Copy Machine
    Element is an empty element.
    Element is ID: 3 DESCRIPTION: Laptop PC
    Element is an empty element.
    Element is ID: 4 DESCRIPTION: Desktop PC
    Element is an empty element.
    Element is ID: 5 DESCRIPTION: Scanner
    --------------------------------------------------
    Sparsely populated elements: 5
    DECLARE
    *                                                 
    ERROR at line 1:                                  
    ORA-01403: no data found                          
    ORA-06512: at line 14                             
    ORA-06512: at line 35
    What's not in the code (or what I did not understand)? Help please!

    Your error occurs because you are dealing with a sparsely populated collection and using an index for items that do not exist.

    For collections of the low density of population, you must iterate through using FIRST and THEN as modeled not from 1 to COUNT.

    The crucial difference between your code and the example is:

    tempParts(i)
    

    Which, as you have demonstrated, doesn't work very well (!) if there is no item (i).

    The code example is a little unusual in my opinion.

       currentElement := p_collection.FIRST;
       FOR i IN 1 .. p_collection.COUNT
       LOOP
        ...
        currentElement := p_collection.NEXT(currentElement);
       END LOOP;
    

    It works, but it's an unusual way to iterate through a collection of rare which is perhaps most often done like this:

       currentElement := p_collection.FIRST;
       WHILE(currentElement IS NOT NULL)
       LOOP
        ...
        currentElement := p_collection.NEXT(currentElement);
       END LOOP;
    

    Which is perhaps less open to confusion.

    In the end, the distinction between

    tempParts(currentElement).id
    

    and

    tempParts(i).id
    

    is crucial.

Maybe you are looking for