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!

Ajax call inside apex plugin

834045Apr 18 2011 — edited Jun 28 2013
Hey,

I've done Ajax calls in Apex before, but I'm still figuring out how to do this inside a plugin.

The Ajax function itself is contained within my plugins code. I'm doing the call from a javascript.
I have an element containing the ajax identifier (a long number of characters and numbers).

I tried both with jquery and javascript but both seems to fail to call, so I have to assume I'm calling it the wrong way somehow.

This is the actual call to my ajax:

var get = new htmldb_Get(null,$x('pFlowId').value,'PLUGIN='+pAjax,0);
get.addParam('x01',pInterval.value);
gReturn = get.get();
if(gReturn){
pDates = gReturn;
alert('return:'+pDates);
}

My ajax (simplified) looks like this (left out the calculations):
FUNCTION ajex_dajaxvalidationtime(
p_item IN apex_plugin.t_page_item,
p_plugin IN apex_plugin.t_plugin,
p_value IN VARCHAR2 )
RETURN apex_plugin.t_page_item_validation_result
IS
v_variable NUMBER := TO_NUMBER(wwv_flow.g_x01);
BEGIN
pck$log.p_log('test ajax call');
HTP.prn(sysdate);
END ajex_dajaxvalidationtime;

Instead of getting an alert with the data my ajax returns I get a poppup with html code

Inside the ajax I have a log package logging, and since it's not logging I'm assuming the call fails.

Any toughts or suggestions?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2013
Added on Apr 18 2011
4 comments
1,603 views