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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

APEX submit changes to database when value is changed Javascript?

1009117May 15 2013 — edited May 15 2013
Hi,

Im new to Apex and am using v4.1.

What I want to do is have a tabular form that will have 5 entry fields and a number of read only fields based on a SQL table & View, when a user updates one of the 5 entry fields I want to save the change to the databases automatically.

I was thinking this could be done using Ajax and Javascript however my knowledge is not at a high enough level to get this to work.

I think what I need to do:

1. Create an AJAX Callback process (lets say its called "Submit Changes") - This will be PL SQL that will update the database based on the field value that has been changed. I think this will require the tabular form row number to be passed into it.

2. Create a HTML Header with the Javascript that calls the AJAX Callback process - I found the below on the net but don't think I have altered it correctly:
<script type="text/javascript">
function Submit_Value(){
var ajaxRequest=new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=Submit Changes',0);
var ajaxResult=ajaxRequest.get();
alert(ajaxResult);
}
</script>

3. Edit the "Element Attributes" on the Report column to something like onchange="Submit_Value()";

So far I have not been able to get this working and would appreciate any help or suggestions.

Thanks

Naill
This post has been answered by Jayson Hanes on May 15 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2013
Added on May 15 2013
2 comments
681 views