Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Application Process return output to Javascript

646109Jan 2 2009 — edited Jan 2 2009
I am currently work on an APEX application with an attempting to intergrate APEX and AJAX. I have defined a Function to return XML from a function. The function return the correct values. When I attempt to call it from APEX I get get an error regarding it is not a procedure. So I created a procedure that called the function. Can someone please explain how I can get the output from the PL/SQL procedure back to my javascript. Here is the stored proc:
CREATE OR REPLACE PROCEDURE GET_TREEGRID_XMLST IS

results2 CLOB;

BEGIN

--This will return a clob containing XML
SELECT GETRNC_CONFIG_TREEGRID_XML2 into results2 from dual;

-- I get and error here because the contain is more than 32K
-- error ORA-06502: PL/SQL: numeric or value error
htp.prn(results2);


END GET_TREEGRID_XMLST;
/

How can I just return the XML object?

Here is the call from javascript:
var getit = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=GET_TREEGRID_XMLST',0);
alert(getit);
gReturn = getit.get();
-- This produces nothing..... (null)


Can anyone help. To sum everything up:
1. I query a set of table and generate a XML tree and return that in a function call.
2. I want to pass those result back to APEX
3. Display the result in a javascript function

I am using Oracle 10.2.0.4, APEX 3.1.2.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 30 2009
Added on Jan 2 2009
1 comment
804 views