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!

Auto Populating the Form Fields after login

651781Sep 2 2008 — edited Sep 3 2008
Hi,

I am trying to populate the values of a FORM after login.

Here is what I am doing:

I have the LOGIN PAGE and user login is successful and redirected to page '2'.
I want to populate some of the form fields dynamically as the users moves to the PAGE '2' after login.

This is what I did,
I created a Application Process that will do the getting the values.

And I created a Java Script function and I invoke this onLoad but the values are not getting populated.

Here is the JS code: And my Application process name is 'f1' which is a simple query with selects and returned.


function f1
{
var get = new htmldb_Get(null,'&APP_ID.','APPLICATION_PROCESS=f1',0);

get.add('P3_deptno',html_GetElement('P3_deptno').value);
gReturn = get.get();

if(gReturn)
{
var loc = gReturn.indexOf(',');
var dept = '';
var dname = '';
var loc = '';

str = gReturn.split(',');
dept = str[0];
dname = str[1];
loc = str[2];

html_GetElement('P3_deptno').value = dept;
html_GetElement('P3_dname').value = email;
html_GetElement('P3_dname').value = status;

} else {
html_GetElement('P3_deptno').value = '';
html_GetElement('P3_dname').value = '';
html_GetElement('P3_dname').value = '';
}

get = null;
}
The above works great if I use a onChange JS event. But I want this to be on page LOAD.

Please let me know on this ASAP.
if there is a document on this please forward me the link.

thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 1 2008
Added on Sep 2 2008
15 comments
548 views