Version 4.2.5.00.08
Hello,
I was asked by a coworker for help with making 3 column read only in a Tab Form.
The 3 columns are created with the API's
1 APEX_ITEM.date_popup with the id assigned as 39.
2 APEX_ITEM.select_list_from_query_xl with the id's assigned as 31 and 32.
There is a button that when clicked with make these 3 columns readonly on the tab form. The are other columns that will become visible when this toggle happens.
I had some old code to make these columns readonly on page load. The issue is that Date column calendar icon isn't disabled even though the calendar text field is.
The function is:
function make_existing_column_readonly()
{
if (document.wwv_flow.f39) // Check to see at least one present
{
var l = document.wwv_flow.f39.length;
if ($v('P280_CATPROM_COM') == "P")
{
if (l == undefined) // Have only one record
{
var curr_id = document.wwv_flow.f39.id;
$x(curr_id).readOnly = "readonly";
$x(curr_id).style.background = "silver";
$x(curr_id).disabled = true;
}
else // Having multiple records
{
for (var i = 0; i < l; i++)
{
var curr_id2 = document.wwv_flow.f31[i].id; //Select List
$x(curr_id2).readOnly = "readonly";
$x(curr_id2).style.background = "silver";
$x(curr_id2).disabled = true;
var curr_id3 = document.wwv_flow.f32[i].id; //Select List
$x(curr_id3).readOnly = "readonly";
$x(curr_id3).style.background = "silver";
$x(curr_id3).disabled = true;
var curr_id = document.wwv_flow.f39[i].id; //Datepicker
$x(curr_id).readOnly = "readonly";
$x(curr_id).style.background = "silver";
$x(curr_id).disabled = true;
}
}
}
}
}
Again, f39 is calendar that we're trying to make the icon disabled.
A different approach, if there is one, is more than appreciated.
What additional information can I provide?
Thanks,
Joe