You can Create Post by clicking "Create post" & can reply or put comments for any existing post

74 posts

20 answers

13 comments

5,953 users

Contact me :
Email: dbahossain@gmail.com
Skype: apexexplorer
Phone:+880-1700514916

UpWork Contact Info:
Find Freelancers by: dbahossain
Or
Visit My direct Profile

Caling AJAX call back process in Oracle Apex using Javascript

0 votes

Do the Below Steps:

1. Create an Application Process

  • Go to share components
  • Click "Application Process"
  • Click Create>
  • Put the Process Name = "EMP_NAME"  ( here you can put your own defined name)
  • Select Process Point =

Ajax Callback: Run this application process when requested by a page process.

  • Type the below PL/SQL Code in the code editor:

declare
v_ename varchar2(100);
begin
select ename into v_ename from emp where empno = APEX_APPLICATION.g_x01;
HTP.PRN(v_ename);
end;

 2. Create an Application Page & Add 2 Text fields under it

  • P2_ID
  • P2_NAME

Note: in this example my Page ID is 2, in your case Page ID and Item name may be different

  • Now go to your Application Page Property
  • Locate HTML header
  • Now type the below code in the HTML code editor

<script type="text/javascript">
function fn_get_name()
{

apex.server.process("EMP_NAME",{x01: $v('P2_ID')},
{

dataType: 'text',
success: function(pData){$s('P2_NAME',pData);}
}
);

}

</script>

  • Now go the property Text Field "P2_ID"
  • Locate Advanced > Custom Attributes
  • Type the below code in the custom attribute field

onchange="fn_get_name();"

  • Save Changes

3. Now Run the Application and Put 7839 Employee ID and you will notice "KING" is showing in the P2_NAME field.

 

Thank You

 

asked Oct 4, 2017 in Apex by admin (2,850 points)
edited Oct 4, 2017 by admin

Please log in or register to answer this question.

© 2013 apexexplorer.com. All rights reserved.
...