display a value from PLSQL code for screen

How to display a PLSQL code on screen without loading value or refresh the page?

I'm using ajax to call javascript code to run the PLSQL code. I want to see a value on the screen when I launch the PLSQL code

SKUD.

everything you print from the PLSQL code (using htp.p, htp.prn etc.) with will be available in Javascript as the response from the server. You can only analyze this string in javascript and display on the screen or change the page elements or create objects / dynamic elements using these values.

A minimal example
OnDemand PLSQL process: TEST_PROCESS

begin
  htp.prn('hello world');
end;

JavaScript code

var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=TEST_PROCESS',0);
ajaxResult = ajaxRequest.get();
alert(ajaxResult);

Displays an alert message "hello world".

You can build the string to JSON/XML in PLSQL from the structures of complex data (or more values) or even code HTML, then the treatment required in Javascript, for example extract the values of element of it and set the elements, convert the JSON array to an item from the selection list in the page or put the HTML for a div element on the page.

Tags: Database

Similar Questions

  • show more than one value of PLSQL code for screen

    How to display more than one value of PLSQL code on screen?


    Below the code has the function of printing two PLSQL code. Can someone pls change the Javascript code according to the code below.
    begin
      htp.prn('hello world');
      htp.prn('hi');
    end;
    JavaScript:
    Javascript Code
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=TEST_PROCESS',0);
    ajaxResult = ajaxRequest.get();
    alert(ajaxResult);
    SKUD.

    OPPS...

    Need arr = ajaxResult.split(':');

    Kind regards
    Shijesh

    **

  • How to display the value of the variable for bottom of pl/sql

    How to display the value of the variable for bottom of pl/sql

    declare

    V_1 number: = 10;

    V_2 number: = 20;

    V_3 number: = 30;

    v_4 number: = 40;

    v_5 number: = 50;

    test varchar2 (100);

    Start

    I'm in 1.5

    loop

    test: = "v_" | I have;

    dbms_output.put_line(i||) e > ' | test);

    end loop;

    end;

    /

    How to get below output:

    1 > v_1

    2 > v_2

    3 > v_3

    4 > v_4

    5 > v_5

    But I want to output of

    1 > 10

    2 > 20

    3 > 30

    4 > 40

    5 > 50

    Hello

    You cannot reference variables as you did and get the value of the variable. Use pretty collection.

    set serveroutput on size 2000
    declare
      type      number_table is table of number;
      numbers   number_table := number_table(10, 20, 30, 40, 50);
    begin
      for i in numbers.first .. numbers.last
      loop
        dbms_output.put_line(i || '->' || numbers(i));
      end loop;
    end;
    /
    
    anonymous block completed
    1->10
    2->20
    3->30
    4->40
    5->50
    

    See the Collections of PL/SQL and Records http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#LNPLS005

  • the value of discount code for free product

    Hello

    I am trying to create a discount code that we can give to the family/friends for a product, the quantity, so the product will be free. We want to create a small flyer with this code, so we can give this easily.

    But I noticed that when using the same code and then I suppose they can give to someone else and it will work as well and that should not be possible.

    Is it possible to work around this problem, or is the only way to do it is to make a unique code for each person and make sure that it is redeemable once? That would mean that we cannot print these brochures at the front, or each must have a unique code.

    pls advise.

    thnx

    Of course, http://kb.worldsecuresystems.com/893/bc_893.html

  • looking for google display network "clickTAG" (from google Designer) for my banner animated dashboard

    Hello, im Tom from Poland (www.tomaszrozynski.pl/en)

    I make websites and banners led for a long time.

    Now, I learned Adobe Edge animate to create smooth banners. I have trouble with because Google Display network there is no instruction how to assign clicktags for edge creations animated :/

    This is the specification of google:

    https://support.Google.com/adwordspolicy/answer/176108?hl=en

    And we can see post called "all other ads in HTML5:

    There is instruction to embeed exitapi.js but how?

    I can put adobe edge div like this:

    < div id = 'Stage' class = "EDGE-33699841" >

    in:

    < a onclick = "ExitApi.exit ()" > click here! < /a >


    ?


    Help, please. I don't want to use Google Designer because this software is really bad workflow, and I hate it. Adobe edge is simillar to legacy adobe (because we can control different penetration at the same time).


    Thank you!

    Best regards

    Tom

    Fears that he is no longer an admin for this forum because it's something that should be pinned.

    Btn syntax "clickTAG" DCM for Edge

    Window.Open (clickTag, "_blank");

    Add the published HTML file just before and after

    Uncheck the box use this for the edge js file in the publication settings.

    Your files zip after publication.

  • Easy way to display the value of the search for value vs reference foreign key itself

    I understood how to do this for a form

    http://www.DBA-Oracle.com/HTMLDB/t_lov_list_values_master_parent_child.htm

    .. .but not for a report which lists the data line by line.

    Center table with the following columns:

    ID
    Name
    Department_id

    and service table with the following columns:

    ID
    Name


    When the report runs on the Center table, it queries simply department_id, name and the ID of the database and then displays each column as it is.

    Instead of display the Center table department_id (which is a number and not very informative), how can I do to display the name of the department table?

    I have many other similar areas that should be displayed in this way, so I hope that there is not a ton of configuration/coding I have to do.

    Hello

    Try the report query

    SELECT a.id,
      a.name,
      b.name dept_name
    FROM centre a,
      department b
    WHERE a.department_id = b.id
    

    BR, Jari

  • Return a value from the pop-up screen

    Long story short - I have a PopupScreen. This has two text boxes. What I want to do is to call a method on the original screen (the one that calls the popup), using these values in two text box.

    The only thing I can't do is pass back the two field values. Ive tried to call the method. Even tried passing the screen in the popupscreens constructor.

    private class goToMenuItem extends MenuItem {
            public goToMenuItem() {
                super( new StringProvider( "Test" ), 0, 0 );
            }
            public void run() {
                CustomPopUpScreen cstmScreen = new CustomPopUpScreen();
                UiApplication.getUiApplication().pushModalScreen(cstmScreen);
            }
         }
    
     public class CustomPopUpScreen extends PopupScreen {
    
                BasicEditField T1;
                BasicEditField T2;
    
                public CustomPopUpScreen() {
                    super(new VerticalFieldManager(CustomPopUpScreen.NO_HORIZONTAL_SCROLL));
    
                    BasicEditField T1= new BasicEditField( "T1: ", "", 20, BasicEditField.EDITABLE | BasicEditField.FILTER_REAL_NUMERIC);
                    BasicEditField T2= new BasicEditField( "T2: ", "", 20, BasicEditField.EDITABLE | BasicEditField.FILTER_REAL_NUMERIC);
    
                    ButtonField cancel = new ButtonField("Cancel");
                    ButtonField submit = new ButtonField("Go To");
                    add( T1);
                    add( T2);
                    add(submit);
                    add(cancel);
    
                    cancel.setChangeListener( new FieldChangeListener() {
                        public void fieldChanged(Field arg0, int arg1) {
                            close();
                        }
                    });
    
                    submit.setChangeListener( new FieldChangeListener() {
                        public void fieldChanged(Field arg0, int arg1) {
                            GoTo();
                            close();
                        }
                    });
                }
    
                public void GoTo()
                {
                        //GoTo(Double.parseDouble(T1.getText()),Double.parseDouble(T2.getText()));
                }
            }
    

    Just to add a bit to the response of Simon.

    "I want to do is call a method on the original screen.

    OK, I have to ask, why do you do this?  It doesn't seem very object ish.

    If you want to call this method once the screen has been closed, then the approach you use (modal form) works, you need to get the values in the treatment of menu and then you can call the transformation of in the menu on the screen who has access to the treatment method.

  • How to display Quick values in the story

    With the help of 11.1.1.6.2

    In a dashboard page, I have a table with a hierarchy of dimension for the organization. If you click on a division he runs a link action to call a script in the browser (javascript in a text on the dashboard section) from the division. If you expand the section, and then click on a market, it calls the function javascript even.

    Then, the Javascript function uses path go to update an analysis in an iFrame on the dashboard page and passes the value of the Division or the market value.

    The analysis of the target has two filters: Division is invited and the market is invited.

    So, after all, my question is how could display two values from the call of the road go into a narrative on the analysis of the target? Or I guess the other question is how to view the filter on the narrative values.

    Sorry for the long explanation, but I hope it makes sense.

    Thanks for any help or suggestion.

    Brad

    Try something using the Div tag
    for ex:
    < div id = filterValues > @{WeekBetween} {Default Value} < / div >
    < script >
    var i = document.getElementById('filterValues').innerHTML;
    document.getElementById('filterValues').innerHTML = aParams ["varDivision"];
    < /script >

    If brand pls help

  • To automate SQL using PLSQL Code scripts

    Hi all

    I have 20 (11.2.0.3) database server hosted on unix and Windows platforms.

    Every day I have to kill sessions inactive of all these 20 databases of servers. I made a script below:

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

    connect sys / & & sys_password @& & tns_database_name as sysdba

    COIL E:\DELETE_INACTIVE_SESSIONS. SQL

    set PAGESIZE 1000

    whole FLAX 5000

    SET ECHO OFF;

    SET FEEDBACK OFF;

    SET THE OFF POSITION;

    Select "alter system kill session ' |'" | " SID | «, » || SERIES # | ' "|' immediate; "session $ v where status = 'INACTIVE' and username in ('OSS_DICTIONARY', 'ADMINISTRATOR');

    SPOOL OFF;

    @E:\DELETE_INACTIVE_SESSIONS. SQL

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

    Is there a way that this execution of the script can be automated in the PLSQL code for 20 servers as well and that the code that can be inserted in the batch file to run (i.e. can be run through my computer batch file windows laptop).

    Thank you

    Boujemaa wrote:

    No there is no way to manage the sql scripts in the PLSQL code?

    Well, remember that PL/SQL is executed on a server specified by a certain user if you are already connected when executing a PL/SQL code.

    You can actually use a more SQL script to connect to different servers to help connect and run your script.

    that is to say:

    SQL > connect sys/pwd_server1@db_server1

    SQL > @killinactive.sql

    SQL > connect sys/pwd_server2@db_server2

    SQL > @killinactive.sql

    But there is not much difference with my previous solution.

    Please explain exactly what you want to do.

    Kind regards.

    Al

  • RS 232 codes for LG LCD screen

    Can someone verify that these are the correct hex codes for the LG TV for the DMP?

    On = 6b612030312030310d

    OFF = 6b612030312030300d

    I can't seem to get to work and I am sure that we are using a Null modem cable.

    Thank you!

    I was able to use the built-in controls of the TV for a Cisco 32N display to activate the display on LG and outside.  However, I have no need to create a custom command for switching to and from the HDMI and cable.  Hexagonal orders for those who are below.

    RS232.tx_hex = 6b622030312030300D

    RS232.tx_hex = 6b622030312030320D

    Your orders are similar so I guess they are correct.

    Did you run the "RS-232: supported, non-DMTech display control ' advanced on the DPM before this command task?"

    After execution of the command, executed a status on the DMP in question, look for the lines starting with rs232 and see what the rs232.tx_hex has the value should be your order on little matters whether it worked or not.  I usually copy the result of status in a notebook, easier to look through and you can use the find command.

    Good luck

  • Impossible to select the value from the search screen (quick select, then) on OFA

    Hello

    We have a problem with a user who are not able to select any value from the LOV on any page of the Oracle.

    1. click the button of LOV

    2. search + go

    3. Select or quick selection nothing happens (error on the Page appears in the left corner of the homepage)

    4. only cancel works.

    Any suggestion would be appreciated.

    I saw a similar question posted Impossible to select the value from the search screen (quick select, then) on OFA

    But unfortunately this is not the answer.

    Thank you

    Sam

    Display of the solution to help others. I tried to connect a SR and suddenly a pop Note ups that helped.

    The problem is related to the profile "Self Service Accessibility Features" customer has defined for the user concerned.

    Follow these steps:

    1 change the value of 'None' profile at the user level.

    2 disconnect / connect to the application and testing.

    See you soon.

  • ERR-9131 error in the body of PLSQL function for default code point, the point =

    Hi all


    I am filling a field element of text in two different ways, but on the same page:

    1 - the page is called to change the values inside-> value of the element comes from field of database

    2 - the page is called to insert new values-> value of the element comes from a calculated function that returns a default value

    Point features:

    Source->

    always replace any existing value in session state

    database column

    -> Default

    -----------------------------------------------------------------------------------------------------------------------------
    default value
    ------------------------------------------------------------------------------------------------------------------------------
    DECLARE
    NUMBER OF THE LINHA;
    gene number;
    i_emp varchar2 (32000);
    v_sql2 varchar2 (32000);
    BEGIN
    i_emp: =: P62_EMP_COD;

    IF: P62_RDD_LIN IS NULL THEN
    LINHA: = 1;
    ON THE OTHER
    LINHA: =: P62_RDD_LIN;
    END IF;

    v_sql2: =' select '. i_emp |'. Grh_1_utils. GRHFU_RUB_DEFAULT ('|: P62_ENT_COD |', 'R' ' |: P62_REM_COD |', 1, 1000000, to_date null, "D", ("' |: P62_DAT_INI |")) (', "DD/MM/YYYY"),' | LINHA |') the double ';

    EXECUTE IMMEDIATE v_sql2 INTO gene;
    COMMIT;

    return deciphered;
    end;
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    default value - body of the PL/SQL function




    The error I get is:



    ORA-00936: lack of expression

    ERR-9131 error in PLSQL function for default code point body, item = ITEM_TO_POPULATE



    Something is wrong with my function or is a different, better way to do this?


    Cordially Pedro.

    Hello

    You can do some tests?
    (1) try to make this code first (to make sure that the P62_EMP_COD is not null when running):

    DECLARE
    LINHA NUMBER;
    defeito number;
    i_emp varchar2(32000);
    v_sql2 varchar2(32000);
    BEGIN
    i_emp := :P62_EMP_COD;
    
    IF :P62_RDD_LIN IS NULL THEN
    LINHA:=1;
    ELSE
    LINHA := :P62_RDD_LIN;
    END IF;
    
    v_sql2:='select '||i_emp||'.Grh_1_utils.GRHFU_RUB_DEFAULT('||:P62_ENT_COD||',''R'','||:P62_REM_COD||', 1 , 1000000,''D'',null,to_date('''||:P62_DAT_INI||''',''DD/MM/YYYY''),'||LINHA||') from dual';
    
    EXECUTE IMMEDIATE v_sql2 INTO defeito;
    COMMIT;
    
    return defeito;
    end;
    

    (2) then you can try to change your source, by changing 'replacement always of value that exists in the session state' "only when null.

    (3) enter your variable dynamic SQL code and check it out:

    DECLARE
    LINHA NUMBER;
    defeito number;
    i_emp varchar2(32000);
    v_sql2 varchar2(32000);
    BEGIN
    i_emp := :P62_EMP_COD;
    
    IF :P62_RDD_LIN IS NULL THEN
    LINHA:=1;
    ELSE
    LINHA := :P62_RDD_LIN;
    END IF;
    
    v_sql2:='select '||i_emp||'.Grh_1_utils.GRHFU_RUB_DEFAULT('||:P62_ENT_COD||',''R'','||:P62_REM_COD||', 1 , 1000000,''D'',null,to_date('''||:P62_DAT_INI||''',''DD/MM/YYYY''),'||LINHA||') from dual';
    return v_sql2;
    EXECUTE IMMEDIATE v_sql2 INTO defeito;
    COMMIT;
    
    return defeito;
    end;
    

    (4) prevent your run immediate code of SQL Injections using the link:

    DECLARE
    LINHA NUMBER;
    defeito number;
    i_emp varchar2(32000);
    v_sql2 varchar2(32000);
    BEGIN
    i_emp := :P62_EMP_COD;
    
    IF :P62_RDD_LIN IS NULL THEN
    LINHA:=1;
    ELSE
    LINHA := :P62_RDD_LIN;
    END IF;
    
    v_sql2:='select '||i_emp||'.Grh_1_utils.GRHFU_RUB_DEFAULT(:1,''R'',:2, 1 , 1000000,''D'',null,to_date(:3,''DD/MM/YYYY''),:4) from dual';
    
    EXECUTE IMMEDIATE v_sql2 INTO defeito USING :P62_ENT_COD, :P62_REM_COD, :P62_DAT_INI, LINHA;
    COMMIT;
    
    return defeito;
    end;
    

    Best regards, Kostya Proskudin

  • Single request for the display of all, but the values of 1 column for all tables

    Hello

    All tables have the column SYS_CREATION_DATE.
    But I don't want to not display the value of this column

    Can anyone suggest a way in which I could achieve this?

    Oracle version: 11 GR 1 material
    OS: SunOS


    See you soon,.
    Malika

    Published by: user9131570 on July 6, 2010 19:57

    user9131570 wrote:
    @Tubby

    I * table-wise display the values of all but 1 columns (SYS_CREATION_DATE) in my database.*

    I need it to compare to another data base for all these values.

    I would like to make a wild guess at what you are getting.

    In view of these two tables

    create table emp
       (empid number,
        empname varchar2(15),
        empaddr   varchar2(15),
        sys_creation_date date);
    --
    create table dept
       (deptid number,
        deptmgr varchar2(10),
        sys_creation_date date);
    

    you want to combine somehow

    select empid,
             empname,
             empaddr
    from emp;
    

    with

    select deptid,
             deptmgr
    from dept;
    

    in a single sql statement?

  • Value of the parameter is not displayed when moving from page of the dialog box

    Hello

    The question I face, is that I have a backup button with the logic in the PFR in which I call a page of dialogue that has an OK button. I give the floor to press ok another page. I need to capture a XXParty parameter that I put in the CO LIC key but is not displayed in the central of the PR of the other page that is called when you press the OK button. Probably I'm missing something very small. Any help would be greatly appreciated. Thank you


    SAVE BUTTON controller LIC... (Call the dialog box and the parameter)
    =============================================
    If (SaveButton! = null)
    {am.invokeMethod ("addNotes", params);  Transaction record.
    System.out.println ("save backwards");
    Try to build your own Page of dialogue here...
    String MainUrl = "OA.jsp?page=xxksms/oracle/apps/imc/ksms/webui/ShipperOverviewPG & retainAM = Y;
    OAException descMesg = new OAException ("XXTSA", "XX_KSMS_SAVED_NOTES");
    OAException instrMesg = new OAException ("FND", "FND_CANCEL_ALERT");

    DialogPage OADialogPage = new OADialogPage (OAException.INFORMATION, descMesg, null, MainUrl, null);
    OK button to send back the values of the PartyID for CO of the ShipperOverview Page.
    System.out.println ("The party ID is" + left); It is displayed.
    dialogPage.setPostToCallingPage (true);
    java.util.Hashtable formParams = new java.util.Hashtable (1);
    formParams.put ("XXParty", out); Part definition ID in XXParty.
    dialogPage.setFormParameters (formParams);
    pageContext.redirectToDialogPage (dialogPage);


    Partial code in the process asks in the called ShipperOverview Page of the dialog box's OK button
    ====================================================
    super.processRequest (pageContext, webBean);
    Am = (OAApplicationModule) pageContext.getApplicationModule (webBean) OAApplicationModule;
    String XXId = pageContext.getParameter ("XXParty"); Try to recover part ID here of page of the dialog box.
    System.out.println ("The PartyID is" + XXId);

    Salvation;

    Try one of these two options.

    1. pass the value of the part directly in the URL & get it 2nd co:
    String MainUrl = 'OA.jsp?page=xxksms/oracle/apps/imc/ksms/webui/ShipperOverviewPG&retainAM=Y&XXParty="+Party;

    2. After selecting the button ok in the dialog box get the parameters in CO 1 himself then using URL forward, send them to CO 2

    If (SaveButton! = null)
    *{*
    * //Your code... *.
    *//..............*
    *//............*

    Default OAException = new OAException ("XXABCD", "XXABCD_GNO_DELETE_WARNING");
    DialogPage OADialogPage = new OADialogPage (OAException.WARNING, default, null, "","");
    dialogPage.setOkButtonItemName ("DeleteYesButton");
    dialogPage.setOkButtonToPost (true);
    dialogPage.setPostToCallingPage (true);
    String lineId = pageContext.getParameter ("lineId");
    Hashtable ht = new Hashtable();
    HT.put ("lineId", lineId);
    HT.put ('actor', actor);
    HT.put ("empId", empId);
    dialogPage.setFormParameters (ht);
    pageContext.redirectToDialogPage (dialogPage);

    *}*

    * combination else if (pageContext.getParameter ("DeleteYesButton")! = null) {*}
    String lineId = pageContext.getParameter ("lineId");
    String = pageContext.getParameter ("actor") actor;
    Var empId = pageContext.getParameter("empId");
    HashMap formParams = new HashMap (1);
    formParams.put ("lineId", lineId);
    formParams.put ('actor', actor);
    formParams.put ("empId", empId);
    pageContext.forwardImmediately ("OA.jsp?page=/xxx/oracle/apps/xxabcd/appraisal/webui/DrillDownPG",
    NULL, KEEP_MENU_CONTEXT,
    NULL, formParams, true,
    ADD_BREAD_CRUMB_NO);
    *}*

    --
    GsrC

  • RE: iOS iPhone 6 s 10 how l remove or disable the slippery camera from outside the locked screen? This feature is a security and threat privacy for me.

    RE: iOS iPhone 6 s 10 how l remove or disable the slippery camera from outside the locked screen? This feature is a security and threat privacy for me.

    You can not. However, I'm not sure why you think it's a privacy or security threat. The only thing that can be accessed without unlocking the phone is the camera to take pictures. No one can access your data already on the phone.

    You can send feedback to Apple here:

    http://www.Apple.com/feedback

Maybe you are looking for