Hi all,
yesterday I had a doubt using apex_item.checkbox and how to change them using javascript:
9600339
Today, I'm facing a similar problem, but with select lists. Here it goes. I have a report with apex_items, like this:
select
apex_item.checkbox(1,"ID",NULL,NULL,NULL,'f01_#ROWNUM#') " ",
apex_item.select_list_from_lov(2,"SW_STATUS",'F2010051_SET_STATUS','onChange="setItems(''f01_#ROWNUM#'',''f03_#ROWNUM@'')"','NO') sTATUS,
apex_item.select_list_from_lov(3,"REVISIO",'F2010051_SET_REVISIO',NULL,'NO','f04_#ROWNUM#') "REVISIO"
from Fx1_v
The javascript code is as follows:
<script type="text/javascript">
function setItems(cb,estat){
elem = $x(cb);
alert(elem.value);
$x(cb).checked = true;
elem2 = $x(estat);
alert(elem2.value);
}
</script>
The idea is that everytime the item g_f02 (a select list) changes, calls the JS function with two parameters: a checkbox (g_f01) and another select list (g_f03). The function should change the items to a defined values. The checkbox changes ok thanks to the help I got yesterday, but I can't work with the third item (select list g_f03). When I try to show the value, it says "undefined".
how could I see the actual value of the select list LOV and change it to 1, for example?
Thank you very much, any help will be appreciated!!!
Edited by: Elena.mtc on 19-may-2011 8:11