Hi All,
I have a report page with two date fields on one HTML region & links on the other HTML region. The requirement is such that when a user clicks on the first date field then that field should be populated with a first date on the database. Here's the process:
1. In the HTML Form Element Attributes for item: P3_START_DATE, I have placed:
onclick="javascript:first_Date('P3_START_DATE');"
2. The javascript to call a page process:
function first_Date(eItem)
{
alert('Call Process . . . ');
var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=Find_First_Date',0);
alert('Process Called!');
get.add(eItem,$x(eItem).value);
alert('Value of First Date is: ' + $x(eItem).value);
gReturn = get.get();
eval(gReturn);
get = null;
}
3. PL/SQL Page Process:
BEGIN
select MIN(APPLICATION_DATE) into :P3_START_DATE FORM_DATA;
END;
What am I doing wrong here? By the way, the page process point is: On Submit - Before Computations & Validations. I changed the process point to: On Load - Before/After Header & the field was loaded when the page loaded which is not what I want. Any suggestions?
Regards
Kamo