APEX DoSubmit button with js before pl/sql processes

Von Tobias Arnhold 9.17.2008
Sometimes you need to use javascript after click on a button before the APEX validations and processes starts.
(For example you have a report with editable fields and maybe a save button on every row. In these special cases you could need something like that.)

Go on edit Button > URL Redirect > change/add
Target is: URL
URL Target: javascript:BUTTON_ACTION();

Edit Page > HTML Header > add the new javascript

<script language="JavaScript" type="text/javascript">
// P1_ACTION field into JS variable

var l_field_id = document.getElementById("P1_ACTION");

// Now you a
re able to put in every type of code
// example: set value for field l_field_id.value =
// 'UPDATE';

// calculate: l_field_id.value = 5 + 5;

// doSubmit



Post Tags:

1 One Comment " APEX DoSubmit button with js before pl/sql processes "


Thanks!! its a nice solution , but when I am trying it in apex 5.0 it not working , it is not showing any error but after clicking the button it is not doing any thing. does javascript:BUTTON_ACTION(); is the same in 5.0 also or there is different way to do this in apex 5.0 .. Thanks in advance