How to call process using ajax

Hello

I use Apex 4.0 in oracle 10g

I am filling an area of text (X 3) based on the value of the selection list (X 2)

I have a problem with regard to the call for a process in ajax


I have created a process as below

declare
l_CCSS_STATUS varchar2 (1000);
Start
Select case_desc in the l_CCSS_STATUS of sced_courses
where case_number =: P1_X2;

HTP. PRN (l_CCSS_STATUS);
end;

and by using the script below, I'm trying to access the process and print the result in X 3 but I'm not able to get that

< script >
function myAjaxCall()
{
var ajaxRequest = new htmldb_Get (null, & APP_ID.:116, 'APPLICATION_PROCESS is termpol1', 0);
ajaxRequest.add ('TEMPORARY_ITEM', $x('P1_X2').value)
ajaxResult = ajaxRequest.get)
$s ("P1_X3", ajaxResult);

}
< /script >


Can someone explain please in this regard.

Thank you
Rik

Hello

Try this

Write the process always uppercase name.
Process of creating On Demand GET_VALUE.

DECLARE
  l_stat VARCHAR2(1000);
BEGIN
  SELECT case_desc
  INTO l_stat
  FROM sced_courses
  WHERE case_number = :P1_X2
  ;

  HTP.PRN(l_stat);
EXCEPTION WHEN OTHERS
  HTP.PRN(SQLERRM);
END;

And the JavaScript to HTML page header

 

Kind regards
Jari

Tags: Database

Similar Questions

  • SRM API: How to call CreateAbrProtectionGroup using PowerCLI

    Anyone who has used CreateAbrProtectionGroup API to create a new protection group?

    What are the arguments to pass to this method? The API doc says that the arguments include the moref in protection record and the name of the protection group.

    However, I see the error on the specification of these arguments below:

    $pgmoref = $srmApi.Protection.CreateAbrProtectionGroup ("file-group-v22", "Group02")

    Could not find an overload for the 'CreateAbrProtectionGroup' and the number of arguments:

    « 2 ».

    On line: 1 char: 53

    + $pgmoref = $srmApi.Protection.CreateAbrProtectionGroup < < < < (folder "-group-v22")

    "Group02")

    + CategoryInfo: NotSpecified: (:)) [], MethodException)

    + FullyQualifiedErrorId: MethodCountCouldNotFindBest

    According to the API Reference , there are 4 parameters for the CreateAbrProtectionGroup method.


    And I think you will have to provide a MoRef object instead of a string for parameters like MoRef.

    $folder. ExtensionData.MoRef

  • How to send data in eloqua with using ajax?

    Hello

    someone tell me how to send data using ajax?

    Thank you

    Rahul

    Hi Rahul

    Using this code to send data to AJAX

    $.ajax({)

    URL: ' your action? elqformname = name of the form eloqua & elqSiteID = eloqua site ID',

    type: 'POST',

    data: "field name =" + document.getElementById('field_id').value + "="+ document.getElementById('field_id').value field name,

    success: {function (html)}

    }

    })

    Thank you

    edynamic expert Eloqua

  • Plans the BPEL process using waiting activity

    Hello

    Can you please briefly explain me how program BPEL processes using waiting activity.

    It would be very useful if explain you with example of bpel process simple respect.

    Please see: SOA_OME/SOA134\bpel\samples\references\Wait sample.

    Hope that helps!

  • How to save a variable, using AJAX, a database mySQL using Coldfusion?

    I have a jquery script that takes a background color of an image using AJAX. I would like to save the variable, var rgba = e.rgba () on a MySQL database. The person who created the script says to use: $.post("color.php",{rgba:reba});) to save a database with AJAX. How to save the var rgba using coldfusion to do CF?

    The script:

    < script >

    ;(Function($){

    $. fn.canvasify = function (f) {/ / faster than dynamically converting one pixel at a time}

    return this.map (function () {}

    If {(this.nodeName=="IMG)"}

    var canvas = $("< canvas >')

    This.SRC = this.src / / IE fix

    $(this) .one ('load', function () {}

    Canvas.Attr ({width: this.width,:this.height}) height})

    Canvas [0]. GetContext ('2d'). DrawImage(This,0,0,this.) Width, this. Height)

    $(this) .replaceWith (canvas)

    })

    return the canvas [0]

    } else {}

    return this

    }

    })

    }

    function Rgba (rgba) {}

    This.RGBA = rgba

    this.toString = function() {return "rgba (" + Array.prototype.join.call (this.rgba, ',') + ")"}

    }

    $. {Event.prototype.RGBA = Function ()}

    var x = this.offsetX | (this.pageX - $(this.target) .offset () .left),.

    this.offsetY = y | (this.pageY - $(this.target) .offset () .top).

    nodeName = this.target.nodeName

    If (nodeName = "CANVAS")

    return new Rgba (this.target.getContext('2d').getImageData(x,y,1,1) .data)

    ElseIf (nodeName = 'IMG') {}

    var canvas = document.createElement ("canvas")

    Canvas.Width = 1

    Canvas.Height = 1

    canvas.getContext('2d').drawImage (this.target, x, y, 1, 1, 0, 0, 1, 1)

    return new Rgba (canvas.getContext('2d').getImageData (0,0,1,1) .data)

    } otherwise return null

    }

    (}) (jQuery)

    {$(function()}

    $("figure").append ("< class p =" rgba">" ")

    $('img').canvasify ravishing (demo))

    $('img').click (demo)

    function {persons

    var rgba = e.rgba (),

    digit = $(this) .parent)

    Figure.CSS ('background-color', RGBA). Find ("p"). Text (RGBA)

    }

    });

    < /script >

    < style >

    {p.RGBA}

    background: white;

    color: black;

    border: 1px solid red;

    min-height: 20px;

    }

    < / style >

    Here's some pseudocode

    AJAX

    ...

    $data = {RGBA: $rgba, var1 = $var1, var2 = $var2, etc.};

    ...

    var ajaxResponse = $.ajax({)

    type: 'POST',

    URL: '.. '. /.. /dir/settings.CFC? Method = saveBGColor,

    contentType: "application/json; charset = utf-8 ",

    data: JSON.stringify ($data).

    etc.

    });

    Settings.CFC

  • How to use Ajax get multiple values in an array?

    Hi All-

    I am using AJAX to get multiple values in a table using example of Denes Kubicek in the following link-

    http://apex.oracle.com/pls/otn/f?p=31517:239:9172467565606:NO:

    Basically, I want to use the drop-down list to fill the rest of the values in the form.

    I created the example (Ajax get several values, 54522 application) on the Oracle site.

    http://apex.oracle.com/pls/apex/f?p=4550:1:0:

    Workspace: iConnect

    Login: demo

    password: demo

    I was able to reproduce his example on page 1 (homepage).

    However, I want to use system generate a table to complete this example and was not able to complete the data correctly.

    Page 2 (method 2) is that I'm struggling to fill the column values. When I checked the item application values in the Session, and values seems to be filled properly.

    That's what I did on this page:

    1 create an Application process on-demand - Set_Multi_Items_Tabular2:

    DECLARE
      v_subject my_book_store.subject%TYPE;
      v_price my_book_store.price%TYPE;
      v_author my_book_store.author%TYPE;
      v_qty NUMBER;
    
      CURSOR cur_c
      IS
      SELECT subject, price, author, 1 qty
      FROM my_book_store
      WHERE book_id = :temporary_application_item2;
    BEGIN
      FOR c IN cur_c
      LOOP
      v_subject := c.subject;
      v_price := c.price;
      v_author := c.author;
      v_qty := c.qty;
      END LOOP;
    
      OWA_UTIL.mime_header ('text/xml', FALSE);
      HTP.p ('Cache-Control: no-cache');
      HTP.p ('Pragma: no-cache');
      OWA_UTIL.http_header_close;
      HTP.prn ('<body>');
      HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
      HTP.prn ('<item id="f04_' || :t_rownum || '">' || v_subject || '</item>');
      HTP.prn ('<item id="f05_' || :t_rownum || '">' || v_price || '</item>');
      HTP.prn ('<item id="f06_' || :t_rownum || '">' || v_author || '</item>');
      HTP.prn ('<item id="f07_' || :t_rownum || '">' || v_qty || '</item>');
      HTP.prn ('</body>');
    END;
    
    
    
    
    
    

    2. create two objects application - TEMPORARY_APPLICATION_ITEM2, T_ROWNUM2

    3. put the following text in the Page header:

    <script language="JavaScript" type="text/javascript">
    function f_set_multi_items_tabular2(pValue, pRow){
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Set_Multi_Items_Tabular2',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM2',pValue)
    get.add('T_ROWNUM2',pRow)
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM2','null')
    }
        gReturn = get.get('XML');
        if(gReturn){
            var l_Count = gReturn.getElementsByTagName("item").length;
            for(var i = 0;i<l_Count;i++){
                var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
                var l_ID = l_Opt_Xml.getAttribute('id');
                var l_El = html_GetElement(l_ID);    
                if(l_Opt_Xml.firstChild){
                    var l_Value = l_Opt_Xml.firstChild.nodeValue;
                }else{
                    var l_Value = '';
                }
                if(l_El){
                    if(l_El.tagName == 'INPUT'){
                        l_El.value = l_Value;
                    }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
                        l_El.parentNode.innerHTML = l_Value;
                        l_El.parentNode.id = l_ID;
                    }else{
                        l_El.innerHTML = l_Value;
                    }
                }
            }
        }
        get = null;
    }
    </script>
    
    
    Add the follwing to the end of the above JavaScript:
    
    <script language="JavaScript" type="text/javascript">
    function setLOV(filter, list2)
    {
     var s = filter.id;
     var item = s.substring(3,8);
     var field2 = list2 + item;
     
     f_set_multi_items_tabular2(filter, field2);
    }
    
    
    
    
     
    
    
    

    4 query in the form:

    select
    "BOOK_ID",
    "BOOK",
    "SUBJECT",
    "PRICE",
    "AUTHOR",
    "QTY",
    "BOOK_ID" BOOK_ID_DISPLAY
    from "#OWNER#"."MY_BOOK_STORE"
    
    
    
    
    
    

    5. in the column of Book_ID_DISPLAY attribute:

    Add the following code to the attributes of the element: onchange = "javascript:f_set_multi_items_tabular2(this.value,'#ROWNUM#'); »

    Changed-> onchange = "javascript:setLOV(this,'f03'); »

    Now, T_ROWNUM2 returns the value as f03_0001. But TEMPORARY_APPLICATION_ITEM2 returns in the form [object HTMLSelectElement]...

    Please help me to see how I can fill the data in the tabular presentation format. Thank you in advance!

    Ling

    Updating code in red...

    Ling

    LC says:

    Application Item Value Item Name
    54522 3 TEMPORARY_APPLICATION_ITEM2
    54522 f03_0003 T_ROWNUM2

    No T_ROWNUM2 should be 0003.

    I made a copy of your page to make corrections.

    There are several problems.

    First you where submiting T_ROWNUM2 whereas you would use: t_rownum in the pl/sql code.

    I changed the name of the element in the f_set_multi_items_tabular2.

    Secondly you where now affecting the rownumber f03_0001 for the first line.

    Resulting XML returned as follows.

    this xml genericly sets multiple items
    CSS Mastery
    22
    Andy Budd
    1
    
    

    I changed the following text in the show_lov.

    var point = s.substring (4.8);

    var Field2 = item;

    I also had a compilation of pl/sql code error, there was a); missing the end of the last item. Fixed that too.

    But why do you think lpad won't work for lines 10 and more.

    LPAD ('10', 4, '0') will give "0010"

    LPAD ('100 ', 4,'0 ') will give "0100"

    LPAD ('1000 ', 4,'0 ') will give '1000'

    So unless you have more than 9999 lines you would have no problem.

    Nicolette

  • How to call service to process BMP OSB?

    Hi all

    Could someone tell me how to call a proxy service or a business process BPM studio OSB?
    Sorry, I'm new in the scope.

    I tried to:
    create processes-> create Global Interactive-> main cteare task-> type: method, name someMame, etc..

    I tried to code:
    alsbEndpoint as AlsbEndpoint = Fuego.WebServices.AlsbEndpoint (url: "http://localhost:7021/njws_basic_ejb/NormalSimpleBean"))

    thus:

    httpEndpoint as HttpEndpoint = Fuego.WebServices.HttpEndpoint (url: "http://localhost:7021/njws_basic_ejb/NormalSimpleBean"))

    URL*-corresponds to the URI of the endpoint of the OSB business I created using examples of service bus.


    Thank you very much in advance!

    You will need create a module in your component catalog, for example of WebServices. Then right-click on this module and select component Catalog-> Web Service. You can then two points to a copy local or remote from your WSDL and it will be discovered. Alternatively, you can select catalog component-> Aqualogic Service Bus. After that, choose new Configuration and provide a name. You then provide the host/port/user/password to your console of OSB. This will allow you to browse projects and services directly from BPM and then select the one you want to catalog instead of the WSDL. Anyway you will give the same web service catalogued and the same result.

  • Xperia m: How can I configure my telephone to end the call by using the power button / stop

    the question is related to the Xperia mobile m. I want to configure my phone to end the call by using the power on button. How to make this configuration in android phones. many other android phones are capable of it.

    Greetings! At your convenience, please join our colleagues in Sony Mobile for assistance with your question. You can attach them to this site: http://www.sonymobile.com/global-en/support/contact-us/contact-info/. Thank you for your message today!

  • In Windows 3.1, I had the ability to send and receive calls by using a modem, it is possible to do it on Vista? If yes how?

    phone calls in vista?

    In Windows 3.1, I had the ability to send and receive calls by using a modem, it is possible to do it on Vista? If yes how?

    The game, February 16, 2012 21:46:49 + 0000, metalfare wrote:

    In Windows 3.1, I had the ability to send and receive calls by using a modem, it is possible to do it on Vista? If yes how?

    This isn't a problem of version of Windows. Must see with what software
    you are running. Yes, if you use a program that has this feature, you
    can do.
    Ken Blake, Microsoft MVP

  • How can I stop the process using the trigger Disqualification?

    How can I stop and start the process using triggers in Disqualification?  While planning a job, I can not able to see the folder of trigger / trigger name in the tool palette? What kind of file should be placed in the Triggers folder. If you know someone, let me know. If someone has shared an example script which is very useful for me.

    Thanks in advance.

    Malila Chandra.

    It is a common use case.

    You create a job that has a closed Web Services trigger configured before executing the first phase (right click on the stage in the Task Manager, select Configure, you will then see this screen below), with the work or or jobs you need to added stop. This must be configured to be 'blocking', i.e. the rest of the work expected on the triggering comprehensive action.

    Work should have a phase which refreshes the data staging, and another phase (or a phase of post trigger) that returns your work in normal real time (using the trigger on the job).

  • How to call javascript process?

    Hello!

    I have a button Delete which redirects to url:

    javascript:apex.confirm (htmldb_delete_message,'DELETE_CONFIRM_MSG');
    
    

    And a process that is placed after validation.

    How to call this process, I put the button to zero State and condition the type of request = Expression 1 and tried the two doDelete and confirmDelete in the expression field, but it does not work.

    How can I call the process?

    Hi EgaSega,

    Give you an example, try something like below

    (1) change your page

    Create the javascript function in the HTML header

      
    

    (2) of the button calls the javascript function

    action button: "URL redirect".

    Target URL: javascript:f_execProc();

    (3) modify your process

    In Conditions

    When you press the button: no condition button

    Condition type: request = Expression1

    Expression1: REMOVE

    Hope this helps you,

    Kind regards

    Jitendra

  • Process the password recover all on one page (using AJAX)?

    Hi people,

    I created a page with the login form in a secure area, and I also load the application form to recover password on/_System/SystemPages/PasswordRetrieveRequest page using AJAX.

    The request to recover password is displayed when a user presses the lost password link. It all works very well.

    What I would do , is also display the results of the form submission request to recover password on the same page. I understand that the endpoint is LostPasswordProcess.aspx but I'm not sure how exactly to go about it.

    I saw this post on Stackoverflow, but I am having trouble using the suggestion of Robert K Bell in my situation.

    Anyone know if what I am wanting to do is possible and they can give me a little push in the right direction?

    Thank you

    Luke

    OK Luke. Well you don't do not query ajax form.

    You have a page with module_Data reading of a where via a url parameter clause and the blur of the email field request you ajax page in JSON format from the e-mail as a parameter and you will get the CRM client object or not returned.

  • How to call someone at adobe?  I just bought a product and can not use/search it!

    How to call someone at adobe?  I just bought a product and can not use/search it!

    HI Bruno.

    I see you have a subscription to creative under the enamel even cloud as with forums.

    You can download the installer for Creative Cloud from here:
    Creative cloud help | Creative cloud desktop.

    Please let us know if this helps you.

  • How to call a method defined in AppmoduleImpl using a groovy expression?

    Hi experts,

    With the help of jdev 11.1.1.5.0 - adfbc battery.

    I followed this post as the blogger says.
    How to call a method defined in AppmoduleImpl using a groovy expression?
    https://blogs.Oracle.com/ADF/entry/how_to_call_a_method

    While a button insert hit

    Suite error survey.
    java.sql.SQLException: ORA-20483: ADM-
    ORA-06512: at "RMSTD.FUNC_FIND_PLNT_DESC", line 22
    ORA-06512: at line 1
    
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
    It is my code for the function.
    CREATE OR REPLACE FUNCTION func_find_plnt_desc (
       p_bu        VARCHAR2,
       p_plnt_id   VARCHAR2,
       p_lang      NUMBER
    )
       RETURN VARCHAR2
    IS
       CURSOR cur_find_plant
       IS
          SELECT bup_name1, bup_name2
            FROM bus_unit_plants
           WHERE bup_bu = p_bu AND bup_plant_id = p_plnt_id;
    
       rec_find_plant   cur_find_plant%ROWTYPE;
    BEGIN
       OPEN cur_find_plant;
       FETCH cur_find_plant INTO rec_find_plant;
    --RAISE_APPLICATION_ERROR(-20999,P_BU||P_PLNT_ID);
       IF cur_find_plant%NOTFOUND
       THEN
    
          raise_application_error (-20483, 'ADM' || P_PLNT_ID ||'-'||P_BU);
          --NULL;
       END IF;
    
       CLOSE cur_find_plant;
    
       IF p_lang = 1 THEN
          RETURN (rec_find_plant.bup_name1);
       ELSIF p_lang = 2 THEN
          RETURN (rec_find_plant.bup_name2);
       END IF;
    END;
    /
    Reason behind:
    while hitting the insert means null from the value of the survey so error function.

    If am not hitting doesn't mean no problem. the function works correctly return description.

    can someone help me how to override?

    Published by: ADF7 on April 10, 2012 23:51

    ADF7,
    the subject of the post has nothing to do with the question (for as far as I see it).
    As you can see the error message clearly comes from the procedure pl/sql you call the application module, works of groovy appeal method.

    We cannot decide what makes your service if you pass null as a parameter. You can check the settings before you proceed to the procedure or write the procedure in how it treats null parameters.

    Timo

  • The call to an AJAX process when prior to refresh IR

    Hi all

    I have here a situation:
    Run an application process that will set a few parameters.

    I wish to make the process even before a refresh of the IR,
    Can I create an application process but how to call this process in javascript code before the refreshment of the IR?

    Thank you
    Dippy

    Hello

    Yes, if I understand correctly. Before the dynamic action of refresh runs before IR is updated for example when you filter the report.

    Kind regards
    Jari

Maybe you are looking for

  • Problems with Cumberland family tree with windows xp. ?

    Since I put windows xp on my computer, I had trouble with the information stored on my genealogy Cumberland 1.11 - msb. I have 2 problems the first one is the photo I have on do not match the legends I've done. The second problem is the photographs t

  • Content of contacts was hacked

    The content of my Contacts has beenhijacked and a system now uses this list to send fake emails with my name on them. Were asked to remove all my sent emails, have done so, were invited to remove all items, did my best. So, I have to copy my Contacts

  • Missing model?

    I went through the process of creating a new template, download the package supposedly new and installed the software on my machine, but the model was not there. How long will it take before the installation files that are actually updated?

  • BlackBerry webworks: opening of hyperlink problem

    Hello "I'm new to webworks, I try to create a new application that have a simple hyperlink that opens a url with the following Formate: http://:/BBScreensTest/Startup/English.html?page=/BBScreensTest/groupslist.html. the app works fine on curve black

  • Remove the password will do no harm to the operating system?

    Original title: computer repair question My PC is currently at my local computer store getting replaced façade as the USB slots have messed up. When I dropped it out, they asked the password and I forgot to remove it before I got there more so I had