Pass the value to the process of request through javascript

Hey everybody,

I am currently struggling with the call to an application process and passing a value to it through javascript. Ideally, my javascript is triggered by a dynamic action, which itself is triggered when a user changes the value of a selection list. Below is the javascript code that is relevant:

for (k=0; k<active_array.length; k++){
      var request = new htmldb_Get(null, &APP_ID., 'APPLICATION_PROCESS=CAL_COLORS', 0);
      request.add('x01', check_array[j]);
       var ajaxResult = ajax.get();
       alert(ajaxResult);
      active_array[k].parentNode.style.backgroundColor=document.getElementById('P14_TEST_COLOR').value;}

And she calls the application process is also shown below:

declare
v_color varchar2(20);
begin
select color into v_color from cal_colors where other_user = apex_application.g_x01 and user_id = :USER_ID;
:P14_TEST_COLOR := v_color
end;

The issue seems to be that online 03 my JavaScript, especially since my array element is not spent properly in my process. In an attempt to debug this, I added the alert message, however, instead of any relevant information, the alert shows just the HTML page! I'm at a loss as to what I'm doing wrong here, so if anyone has any input, I would very much appreciate it.

Basically, you need to rewrite in the http buffer, using htp.p:

DECLARE
  v_color VARCHAR2(20);
BEGIN
  SELECT color
    INTO v_color
    FROM cal_colors
   WHERE other_user = apex_application.g_x01
     AND user_id = :USER_ID;

  htp.p(v_color);
EXCEPTION WHEN no_data_found THEN
  htp.p('white');
END;

You could potentially make it much more efficient also. At the present time you loop on what is probably an array of elements, so from a tabular form probably. Rather than call an ajax for each line, you can group together them and make a call.

Example:

JS, you can use this to create an array with values to be placed on the server:

var lArray = [];
$("input[name=f03]").each(function(){
lArray.push($(this).val());
});

And you can use the apex.server.process api to call a process on demand:

apex.server.process("MYPROCESS", {f01: lArray}, {success: function(pData){console.log(pData);}})

As you can see, the table with the values is put in the table in the f01. You must use the option of success well since it will be asynchronous (htmldb_Get.get is a synchronous call).

With respect to the CLASS code:

DECLARE
  l_return VARCHAR2(4000);
BEGIN
  FOR i IN 1..apex_application.g_f01.count
  LOOP
    l_return := l_return || '"VALUE' || i || '",';
  END LOOP;

  l_return := RTRIM(l_return, ',');
  IF l_return IS NOT NULL THEN
    l_return := '[' || l_return || ']';
  END IF;

  htp.p(l_return);
END;

It will loop through the items in the table-f01 and build a new JSON notation and write it back to the http buffer so it returns to the client. It will look like this:

["VALUE1", "VALUE2", "VALUE3", "VALUE4", "VALUE5", "VALUE6", "VALUE7", "VALUE8", "VALUE9", "VALUE10"]

I say this because when users use your application, you do not want such a quantity of calls. A single call by treatment action would save a lot of resources. You may have to loop twice on your items to apply your backgroundcolor, but I don't voluntarily not too mention jQuery since you is perhaps not familiar with it and get scared by him.

Tags: Database

Similar Questions

  • Access to the Service of maintenance through Javascript

    Hey guys,.

    Had a problem with access to the service of maintenance through Javascript.

    Let's start first of all, here's the section of code:

    **********************

    var objXMLHttpRequest = new XMLHttpRequest();

    objXMLHttpRequest.open ("POST", "http://localhost:8020/determinations-server/interview/soap/10.4/OPA_IS", false); Point of Service endpoints, synchronous method

    " package of var = ' < soapenv:Envelope xmlns:soapenv = ' http://schemas.xmlsoap.org/SOAP/envelope/ "xmlns:typ =" " http://Oracle.com/determinations/Server/interview/OPA_IS/types ">\

    < soapenv:Body >.

    < typ:open - session-request / >.

    < / soapenv:Body >.

    < / soapenv:Envelope > ';


    objXMLHttpRequest.send (packet);


    **********************

    The ODS with the relevant innterview service has been deployed and I can test this very well through SoapUI. He returned with the correct answer in this casting the Session ID for the new session of the OPA.

    When I run the present thanks to my JavaScript code, I get the following error in my log:

    com.oracle.determinations.server.exceptions.InvalidActionException: no action for 'null' does exist in the service 'odsInterviewService104 '.

    Thus, it seems that it does not find "OpenSession" action that is needed.

    My question is: How to indicate the type of action in my SOAP package?

    I ran across the ODS code and I can see what is causing the error, but everything I try, I can't seem to be able to add action to resolve.

    Kind regards

    Evert

    OK, that is now resolved. Added action and settled the question of calls cross-domain that came after that.

    Everything works now.

    Evert

  • How to extract the values of the other tables in the process upon request

    Hi all
    In Oracle Apex 4.1.
    The Leave_transaction Table contains the following fields,
    1.Leave_id
    2.Emp_name
    3.From_date
    4.To_date
    5.Remaining_days
    The Emp_Master Table contains the following columns
    1.Emp_id
    2.Emp_Name
    3.Remaining_days
    Holiday_master table contains a list of the dates of the holidays as 'From_Date '.

    I have the form based on the Leave_Transaction Table,
    I created the process,
    "Sur-Soumettre after calculations and validations of."
    and posted the following PLSQL code,
    declare
    days number(3);
    ex_days emp_master.remaining_days%type;
    new_rem_days emp_master.remaining_days%type;
    begin
    select count(*) into days from (select dt
    from(
        select to_date(:p1_from_date, 'DD-Mon-YYYY') + rownum -1 dt 
            from dual
    connect by level <= to_date(:p1_to_date, 'DD-Mon-YYYY') - to_date(:p1_from_date, 'DD-Mon-YYYY') + 1)
    where to_char(dt,'fmday') not in ('sunday','saturday') minus (select holiday_start from holiday_master)) dual ;
    
     select remaining_days into ex_days from emp_master where upper(emp_name) = upper(:APP_USER);
    new_rem_days := ex_days - days;
    
      update emp_master set
        remaining_days = new_rem_days
        where upper(emp_name) = upper(:APP_USER);
    update leave_transaction set
        remaining_days = new_rem_days
        where upper(emp_name) = upper(:APP_USER) and
         leave_id=(select max(leave_id) from leave_transaction);
    
    end;
    If the date is between from_date and To_date comes Saturday and Sunday or if any Date exists in the table of Hpliday_master he will exclude and return the count (*) rest of dates.
    For example,.

    If the From_date is 04-may-2012'
    and To_date is 08-may-2012,

    Here the dates 5 May and 6 may are "Saturday" and "Sunday".

    and if any date between From_date and To_date is exist in the Table Holiday_Master
    That is to say that here it is 07-may-2012,

    Then the remaining dates are (excluding sat, Sunday and dates in holiday_table).

    04-may-2012,
    08-may-2012.

    the count (*) is 2.

    I use the code above but it return 5.
    I think that this
     
    ...where to_char(dt,'fmday') not in ('sunday','saturday') minus (select holiday_start from holiday_master))
    code does not work.
    Can someone help me solve my problem.

    Edited by: Gurujothi may 3, 2012 23:59
    set serveroutput on;
    declare
    v_sql varchar2(100);
    begin
            v_sql := 'ALTER SESSION SET NLS_LANGUAGE= ''GERMAN''';
            execute immediate  v_sql;
            dbms_output.put_line(v_sql);
            for c in
                        (
                        select to_char(sysdate + level ,'fmday') day_
                        from dual
                        where to_char(sysdate + level,'fmday') not in ('sunday','saturday')  connect by level < 8
                        ) loop
                        v_sql := c.day_;
                         dbms_output.put_line(v_sql);
                        end loop;
    
            v_sql := 'ALTER SESSION SET NLS_LANGUAGE= ''AMERICAN''';
            execute immediate  v_sql;
            dbms_output.put_line(v_sql);
            for c in
                        (
                        select to_char(sysdate + level ,'fmday') day_
                        from dual
                        where to_char(sysdate + level,'fmday') not in ('sunday','saturday')  connect by level < 8
                        ) loop
                        v_sql := c.day_;
                         dbms_output.put_line(v_sql);
                        end loop;
    end;
    /
    
    ALTER SESSION SET NLS_LANGUAGE= 'GERMAN'
    samstag
    sonntag
    montag
    dienstag
    mittwoch
    donnerstag
    freitag
    ALTER SESSION SET NLS_LANGUAGE= 'AMERICAN'
    monday
    tuesday
    wednesday
    thursday
    friday
    PL/SQL procedure successfully completed.
    
  • How to pass the IDS of lookup through weblink to the narrative report

    Hi all

    How to pass the ID lookup instead of the value in the choice list via the Web link that able to read this list of choice and based on the id id, he should go the narrative report dynamically (reports are named with the lookup id).

    Is is possible. ?
    How to get there. ?

    Thanks in advance...!


    concerning
    sowm

    Hi sowm,.
    What I understand, that values exist in analytics and not their IDs.Hence, you cannot display the ID in the reports. An alternative would be if your data integration team can fill a field with distinctive signs of the back-end database.

    PS: My apologies for late reply.

  • Pass the data XML Captivate through a Widget

    Hi all

    I use widgetfactory API to create my setup.

    I have a flash file Widget that reads the XML data and passes the variables in Captivate.

    However, I can not set the text box with the variable that I analyzed the XML data.  Any suggestions are appreciated!

    ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

    package

    {

    widgetfactory Import. StaticWidget;

    Import widgetfactory.events.WidgetEvent;

    com.adobe.captivate.events import. *;

    com.adobe.captivate.widgets import. *;

    import flash.events. *;

    import flash.display. *;

    flash.net import. *;

    public class load_lang extends StaticWidget

    {

    override protected function enterRuntime (): void

    {

    var myRoot:MovieClip = MovieClip (root);

    var mainmov:MovieClip = MovieClip (myRoot.parent.root);

    mainmov.text_00 = "This works very well.";

    var myXML:XML;

    var myLoader:URLLoader = new URLLoader();

    myLoader.load (new URLRequest ("languages.xml"));

    myLoader.addEventListener (Event.COMPLETE, processXML);

    function processXML(e:Event):void {}

    myXML = new XML (e.target.data);

    var myRoot:MovieClip = MovieClip (root);

    var mainmov:MovieClip = MovieClip (myRoot.parent.root);

    mainmov.text_01 = myXML.slide [0] .textbox [1]; It does NOT work

    }

    }

    }

    }

    ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

    Hi osbornsm,

    Try the above suggestion of Jim, but if this does not work then what probably is the widget is trying to load the languages.xml but can't find it. You will need to make sure that it is placed in the output directory of the Captivate file published to operate. Even in this case, you will not be able to make it work when previewing the movie.

    Probably a better way to go about this would be the XML file into your SWF widget. In this way the widget won't need to load. This is how you would integrate it:

    package

    {

    public class load_lang extends StaticWidget

    {

    [Embed ("path-to-file/languages.xml", mimeType = "application/octet-stream")]

    private var BinaryData: Class;

    override protected function enterRuntime (): void

    {

    var byteArray:ByteArray = new BinaryData();

    var myXML:XML = new XML (byteArray.readUTFBytes (byteArray.length));

    Continue to the processXML() code

    }

    }

    }

  • Error: "some errors have occurred during the processing of requested tasks". Sending emails from Outlook Express

    Original title: Repetitivet sending emails from Outlook Express

    When sending emails from my Outlook Express , the following occurs:

    (1) as usual, send the message falls into my Outbox and begins to be sent.

    (2) when the message was sent, I get a message that "some errors occurred while processing requested tasks" but no actual errors are displayed.

    (3) the sent items folder does not show that a message has been sent... but a message has been sent.

    (4) the original message remains in my Outbox and will be sent over and over again.

    As you can imagine, it's a very embarrassing problem.  All suggestions are welcome, but please keep the instructions clear and simple.

    Ed *.

    Hello

    Windows XP Service Pack 2 is installed on your computer? To work on this question, see these steps.

    It seems that there is a corruption of dbx file.

    I suggest you go over your messages out of the Inbox, and then create new folders Outbox and sent items after you move the messages you want to save to a local folder that you create.

    Reference:

    (a) click onTools

    (b) thenOptions

    (c) selectMaintenance

    (d) Record Store will reveal the location of your Outlook Express files.

    (e) Note the location and navigate on it in Explorer Windows or, copy and paste to start and select run.

    In Windows XP, Win2K & Win2K3 the OE user files (DBX and WAB) are by default marked as hidden.

    To view these files in Windows Explorer, you must enable Show hidden files and folders

    Reference:

    (a) clickStart

    (b) Control Panel

    (c) Folder Options icon

    (d) notice, or in Windows Explorer

    (e) Tools

    (f) the Folder Options

    ( viewof g).

    With Outlook Express closed, find the DBX files for the items in the Outbox and sent and delete them. New ones will be created automatically when you open Outlook Express.

    After you're done, followed by compacting your folders manually while working * off * and do it often.

    Reference:

    (a) clickOutlook Express at the top of the the folder tree so no folders are open.

    (b) click onthe file

    (c) work offline (or double click working online in the status bar).

    (d) file

    (e) file

    (f) compact all folders. Wait for the compaction to complete.

    General precautions for Outlook Express:

    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend about a300 MB max for less risk of corruption.

    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095

    Compact often as specified above.

    Reference:

    (a) in the Tools

    (b) selectOptions

    (c) maintenance:

    (d) uncheck Compact messages in the background and leave it unchecked. (N/a if running XP/SP2).

    And backup often.

    See also: error messages when you send and receive in Outlook and Outlook Express http://support.microsoft.com/kb/813514

    An Outlook Express basic repair kit

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

    Hope the information is useful.

  • Repeated failed installs Ko 977074, 978506, 978506. O/s of hanging in the journal began or pass the user's request.

    OK, here's my story:

    Windows 7 Home Premium, solid running, since 13/10/09
    History of failure of 974431 update that the next day, he managed without my taken part troubleshooting.  No complaints since more about 1 week ago got a BSoD outside no where while my child is on a restricted user account using IE.  Has not returned since, but suffice it to say.
    So now it's 26/01/10 and an update to install Windows Defender K915597 with success.  Cool deal.  It end tonight here and he says it is to install the updates and then stops.  Next day:
    1/27 - KB976972 failed
    1/27 - KB978506 failed
    1/27 - KB977074 failed
    1/27 - KB976972 failed
    1/27 - KB978506 failed
    1/27 - KB977074 failed
    1/27 - office Live add-in 1.4 successful
    1/27 - KB976972 failed
    1/27 - driver update successful
    1/27 - KB977074 failed
    1/27 - KB976972 failed
    1/27 - KB978506 failed
    1/27 - KB977074 failed
    See a pattern here?  So I should also mention that all of a sudden if I click log off or switch users while one of these updates says waiting and not pass/fail it hangs on Please wait... I waited about 10 minutes (normally it's about 10 seconds for the newspaper and immediate to change user) then have to restart the computer or force the feeding cycle.  So I decided to uncheck the Group of updates and just try one at a time through the automatic updates.
    Wait what he...
    1/28 - KB976972 successful
    1/28 - KB978506 successful
    1/28 - KB977074 successful
    1/28 - KB915597 successful (Windows Defender again)
    Hooray! life is good again!
    It end tonight here and he said please wait... Configuration of windows or something like this.  Odd.  Given that all of the updates succeeded and I had no updates available message.  Well it stops down.
    On the morning.  Please wait while windows configures (or other) updates failed returning changes.  What updates?  They managed you cursed!
    29/1 - KB976972 failed (what  Wait.  What?)
    1/29 - KB978506 failed (what  Wait.  What?)
    1/29 - KB977074 failed (what  Wait.  What
    ?)
    1/30 - KB976972 failed
    1/30 - KB978506 failed
    1/30 - KB977074 failed
    1/30 - KB978506 failed (me trying just the update to the compatibility mode)
    1/31 - KB977074 failed (my download and try to install the update manually)
    So there is some sort of timeline for what it's worth.  So basically three updates repeatedly failing and play with my head.   Here are the error codes for each of them:
    Update for Internet explore 8 Compatibility View List for Windows 7 (KB978506)
    Installation status: failed
    Error details: Code 80004004
    Update for Windows 7 (KB977074)
    Installation status: failed
    Error details: Code 80004004

    Update for Windows 7 (KB976972)
    Installation status: failed
    Error details: Code 80004004
    More potentially useful data.  I have manually install a (977074), said she is successful and I want to reboot, Yes, please wait windows configuration, stops, comes up, please wait configuration updates, no error, log, look at the history of the update, says "pending" 977074 next, I reboot on mine, please wait windows configuration, stop , rises, please wait for configuration updates, UPDATES COULD not return changes, allows me to connect... She does it every time.
    So I think I'll just deselect all and hide updates, screw it right?  I don't really have the situations these difficulty going home anyway.  So all deselected.  No found update, green check in Windows doesn't update.  Everything is cool.  Stop this night here, please wait windows configuration, stops, appears, wait for updated configuration to update, UPDATES FAIL back.
    And yet, he is suspended when the logoff or switch user thing.
    Seriously.  What is going on?

    Hello
     
    First, install the system tool using the link provided: http://support.microsoft.com/default.aspx/kb/947821
     
    Then, run boot.
     
    To help troubleshoot error messages and other issues, you can try to troubleshoot this issue with a clean boot to see if we can identify a program or driver causing the problem you are experiencing.
    A clean boot to start Windows with some programs and drivers off or on selection. By doing this through trials and errors we can hopefully identify a specific cause of this problem. Here's how to solve problems with a clean boot:

    Clean clean boot.

    1. click on start, type msconfig in the search box and press ENTER.
    The user account control permission.
    If you are prompted for an administrator password or confirmation, type
    password, or click on continue.
    2. in the general tab, click Selective startup.
    3. under Selective startup, clear the check box load starting points.
    4. click on the Services tab, select the hide all Microsoft Services check box, and then click Disable all.
    5. click on OK.
    6. When you are prompted, click on restart.
    7. after the computer starts, check if the problem is resolved.
     
    If the problem is resolved, make sure what third-party program is at the origin of the problem, referring to the link given below:

    http://support.Microsoft.com/kb/929135
     
    Reset the computer to start as usual.

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:
    Click Start, type msconfig.exe in the start search box and press ENTER.
    If you are prompted for an administrator password or for confirmation, type your password, or click on continue. On the general tab, click the Normal startup option, and then click OK.
    When you are prompted to restart the computer, click on restart.
     
    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:
     
    1. click the Start button, type msconfig.exe in the start search box and press ENTER.
    If you are prompted for an administrator password or for confirmation, type your password, or click on continue.
    2. on the general tab, click the Normal startup option, and then click OK.
    3. When you are prompted to restart the computer, click on restart.
     
    If you are still experiencing a problem, try the following:
     
    I suggest to download the update manually and install it. Use the link below to download the update.
     
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=6711bec7-130F-4244-A13C-675bd9e42298&displaylang=en
     
    If this does not resolve the issue, I suggest you to reset windows update by following the steps listed in the article below:
     
    How to reset the Windows Update components?
     
    http://support.Microsoft.com/kb/971058
     
    You can also use the "Fix it" described in the article above solution.
     
    For more information on August 2009 Windows Vista and Windows Server 2008 Application Compatibility Update, follow this link:
     
    http://support.Microsoft.com/default.aspx/KB/972036

    Thank you, and in what concerns:

    I. Suuresh Kumar-Microsoft Support.

    Visit our Microsoft answers feedback Forumand let us know what you think.

  • Windows Mail - "a few errors have occurred during the processing of requested tasks"

    I get a window every time I have bring to the top of the box mailbox Windows that indicates that 'the host 'YAHOO' could not be found. Check that you have entered the server name correctly - the Yahoo Acct. "Protocol: Pop3, Port: 110, secure (SSL): no, SocketError:1101, error number: Ok899CCCOD.

    There are displayed (hide) (cancel) (Review) boxes which do not appear to cause the return of this particular window to solve.   When I click on 'Review' there is another window appears which States "1 of 2 tasks are completed properly" when I click on "Hide" the window closes but will repeat whenever I visit the Windows Messaging page.  I've not been able to find an answer to this situation, although I did a lot of research to help and support without result.

    You will appreciate any useful info that can clear up this episode.

    Hello RenoMac1,

    Solution: -.
    In all likelihood, your mail server does not work. The ISP (or internal it Department) brought the server for maintenance. Perhaps the server was interrupted due to other problems, or there is a problem with the connection.

    There is really nothing you can do but wait, and keep trying. If the problem persists for a long time, you can call your ISP (or internal it Department) and find out if there is a problem. You can usually find out if it's a connection problem trying to access the World Wide Web using your browser. If you can access the Web, you can assume the connection is good, and the problem lies in the server. Some access providers offer network status reports on their Web sites. You can see the status page of the network on the Web site to see if the ISP knows the problem and is working to fix it. If this is not the case, call your provider and find out if this is a known issue. In most cases, the problem is on the side Server and not with your PC, and you have to wait for its resolution.

    --

  • I'm just starting with LR from iPhoto.  I shoot football and generally shoot 1000 + photos a game, save maybe 20 or more. The process of weeding through these is relatively easy on iPhoto but with LR it seems to require at least one additional step for d

    In iphoto, I use two fingers on the next arrow and remove.  Each image that is a keeper, I jump and all the others I have delete.  I still go through them until I've winnowed down from those I want to change.  In LR, the thumbnails don't actually give me enough ability to see small things I want without importing completely so I have to import all and remove a ton.  all advice appreciated.

    Most of us import everything and then pass in review in the Loupe (press E) and use the keys P and X to mark samples and distortions. If you turn on Auto Advance under Photo menu automatically by moving quickly to the next picture as soon as you press P or X. In the end, you can filter all scrap and press Ctrl +, select them all and then delete as a batch.

  • Pass the authentication for applications through sqlplus scheme?

    Hello

    We want to change the schema of authentication for applications through sqlplus.

    Is it possible to do it with

    () www_flow_api.set_flow_authentication
    p_flow_id in the number default null,
    p_authentication in varchar2 default null);?

    Or will encounter us problems with this statement? Unfortunately, nothing is documented on this procedure!

    Thanks for any help!

    But does it work?

    Experience would give you the answer that is not.

    What is done, when I press the "make current" - button in the Application Builder? Is it the same?

    Not the same, no.

    The URL that is current when you are on the page with the button "Make Current" you tells the application and the page that does the job (4000:822). You can see that this page means when it is submitted by the consideration of this application and the page by using the f4000.sql file from distribution either by reading the code in the file, either by installing this application in your own workspace as an application ID different and using Report Builder to review the page works.

    How do you secure it, that is, who would be able to run the script?

    Scott

  • How to pass the Javascript function OBJECT

    Hello

    I have 2 items.

    P1_ITEM1
    onchange="javascript:function1(this); // here we are passing the object (THIS) for P1_ITEM1
    {code}
    
    
    P1_ITEM2
    {code}
    onchange="javascript:function2(this); // here we are passing the object (THIS) for P1_ITEM2
       
    // how can I pass the object of P1_ITEM1.
    onchange="javascript:function3(xxxx); // here I want to pass the object for P1_ITEM1
    {code}
    
    
    Thanks,
    Deepak                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    Deepak

    Change the function definition for a pThis parameter to start - it's confusing otherwise.

    For your last example, modify the parameters for the function to be () (Nothing) and then have the first line of another function as

    var pThis = document.getElementById('P1_ITEM1');
    

    Then use pThis as object...

    See you soon

    Ben

  • How to pass a value LOV to where clause of another LOV

    Hello

    I have the two LOV project and activity. When I select a value of project LOV this value project to switch to the 2nd activity LOV where clause. How can I achieve this.

    I tried to use the code in the process CO request by getting the value of project with the command below.

    int v_project = Integer.parseInt ((String) passiveCriteria.get ('Project')); grab the critirea project

    and set this value in the setwhereclauseparams of the VO LOV. But the above command is throwing an exception with the exception of null pointer.

    This approach is correct, or should I use any other method.

    Thank you
    HC

    Below you will find the article interesting

    http://oracleanil.blogspot.com/2010/12/dependent-lov-in-OAF.html

    Thank you
    AJ

  • Pass a value from a PL/SQL function to a javascript (html header)?

    Hey guys,.

    Have a question on how to pass a value of a PL/SQL to a JavaScript function in the HTML header.

    I created a PL/SQL function in my database, which makes a loop.
    The reason is: on my apex page when the user selects a code, it should display (or highlight the buttons) the different project id is present for that particular code.

    example = code 1
    a project id = 5, 6, 7

    code 2
    a project id = 7.8

    Thank you for your help or Suggestions
    Jesh

    The PL/SQL function:

    Contact_details (ACT_CODE1 in NUMBER) of the FUNCTION to CREATE or REPLACE RETURN VARCHAR2 IS
    Project_codes varchar2 (10);
    CURSOR contact_cur IS
    SELECT ACT_CODE, PROJECT
    OF ACTASQ. ASQ_CONTACT where ACT_CODE = ACT_CODE1;
    currec contact_cur % rowtype;
    /******************************************************************************
    NAME: contact_details
    PURPOSE:

    REVISIONS:
    Worm Date Description of the author
    --------- ---------- --------------- ------------------------------------
    1.0 06/25/2009 1. Created this function.

    ******************************************************************************/
    BEGIN
    FOR currec in contact_cur LOOP
    dbms_output.put_line (currec. PROJECT | '|');
    Project_codes: = currec. PROJECT | '|' || Project_codes;
    END LOOP;
    RETURN Project_codes;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHILE OTHERS THEN
    -Consider recording the error and then re-raise
    LIFT;
    END contact_details;
    /
  • Call AJAX process and pass the value on request

    Hello
    I want to call a process on demand by a button. So I added the following for her javascript code:


    function update_bp1()
    {
    Alert ('hhhhi');
    Alert (document.getElementById('P11_PATIENTID').value);
    var ajaxRequest = new htmldb_Get (null, & APP_ID., 'APPLICATION_PROCESS is update_bp', 0);
    ajaxRequest.add ('patient_id1', document.getElementById('P11_PATIENTID').value);
    ajaxResult = ajaxRequest.get ();
    Alert (ajaxResult);
    }
    < /script >


    The called application process is:

    declare
    number of v_id;
    number of v_visitno;
    v_patientid varchar2 (10);
    BEGIN

    Select max (id), max (VISITNO)
    in v_id, v_visitno
    of TBL_PATIENT
    where PATIENTID =: patient_id1;

    Update TBL_PATIENT
    the SYSTOLIC value = 10,
    DIASTOLIC = 20
    where id = v_id
    and visitno = v_visitno
    and patientid =: patient_id1;

    commit;

    HTP. PRN ('process value'-|: patient_id1);

    end;

    It seems there is error in the ajaxrequest.add clause, as after commenting on the function is executed. Alert print correctly the value P11_PATIENTID.
    The alert of the ajaxresult gives the complete HTML code and the process is not running. How interpreet ajaxresult error.

    Please help me to identify the problem.

    Thank you

    Hello

    I think that it is not relative browser, but Firefox with the module Firebug is just a better tool for web developer.
    It is easier to debug problems you have now.

    Is the point of application patient_id1? You need also to pass the value to the application process?
    If you don't need it another vise, it is better to use variables global apex_application

    Try this
    JavaScript for HTML page header

    
    

    Then, create the new process On demand application named UPDATE_PATIENT. Please note that the name of this process is case sensitive.

    DECLARE
      v_id        NUMBER;
      v_visitno   NUMBER;
      v_patientid VARCHAR2(10);
      v_count     NUMBER;
    BEGIN
      SELECT MAX(id),
        MAX(visitno)
      INTO v_id,
        v_visitno
      FROM tbl_patient
      WHERE patientid = apex_application.g_x01
      ;
      UPDATE tbl_patient
      SET systolic  = 10,
        diastolic   = 20
      WHERE id      = v_id
      AND visitno   = v_visitno
      AND patientid = apex_application.g_x01
      ;
      v_count := SQL%ROWCOUNT;
      COMMIT;
      htp.prn(v_count || ' rows updated');
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
      htp.prn('error: patientid ' || apex_application.g_x01 || ' not exists in tbl_patient');
    WHEN OTHERS THEN
      htp.prn('error: ' || sqlerrm);
    END;
    

    Kind regards
    Jari

  • Passing parameters to the URL - availability in the new process of request

    Hello

    I am able to pass parameters in the URL of the APEX that defined the points of the application as below

    : http://application-tier server: port/pls/apexdev/f? p = 1001:1:APP_CLIENT_NUMBER, APPLICATION_NUMBER:0001285, 0000051:

    I would like to get and set other items based on elements of application passed as parameters. I would like to only enter once application.

    I found the best place for this action in a process of application with Point on new Instance of Process.

    The problem seems to be that the value of point of application has not been set at this point, and therefore the values are null.

    If I change the application process process Point to something that runs to each page as On Load: after the header, then the values are available. It is not suitable as only wish to run once at startup of the application.

    I can't find discussion of this documentation.

    1. I would be able to access URL parameters in the application process with Point on a new Instance of the process?

    2. are there any other equivalent task for access to URL parameters at the start of the application?

    Thank you

    Hello

    APEX runs only on the new process Instance when a new session has been set up. As you discovered, URL items are not yet saved in session at this point State. You can use a level app process before header instead, with a condition that makes that make it run when certain elements that you want to initialize are null.

    Kind regards

    Christian

Maybe you are looking for

  • Screen saver stops running

    Hello! I have a new Toshiba Satellite with Windows 7 64 bit license. Now I have problem with power settings. When the screen saver is runing, after a while stops runing without moving the mouse. Also, the screen is not turn off after some time...It's

  • Adapter DisplayPort to hdmi adapter for T520

    Hello, I have a T520 and would like to connect it to my TV for picture and sound. If anyone can recommend a particular product (perhaps provide a link) that works well? It seems that some people have problems with delivery of sound (the photo is OK).

  • Smartphones blackBerry 7.1 update

    Hi, since I'm updated my 7.1 BB9810 my camera does not work? can you help me? THX Wolfgang

  • Windws 7 product key is for Windows 7 Home Premium, when I bought Windows 7 Professional

    I bought a copy of windows 7 online and received a sealed copy of Windows 7 Professional. After you perform a custom installation, I entered the product key when you are prompted and got a response of "does not meet Windows SKU. Then, I noticed that

  • view client authentication

    Hi allWe have completed the Security server publishing, but the authentication page he stops, joined the screenshot. Any idea, please helpEverything from the inside of the network works fine. We have opened the ports 443 and 4172