Change checkbox with javascript or jquery
DipJul 20 2012 — edited Jul 24 2012Hello.
I have a report in apex 4.1 with checkbox:
select apex_item.checkbox(1,table.att,'UNCHECKED') as CHOOSE,
...
And another column with ikon, which upon a click (javascript) opens hidden region.
What i want to do next is, to check checkbox when the icon is pressed.
Icon click should open hiden region (which works) and check checkbox in the current row.
I tried it with jquery but i don't know how.
I don't know how to get the row number.
This doesn't work:
$(function() {
$("td[headers=LoD]").click(function() {
var vRow = this.id.substr(this.id.indexOf('_')+1);
var rowSel = document.wwv_flow.f01[vRow].id
if ($x(rowSel ).checked==false)
{rowSel.checked=true;}
});
});
This line doesn't work: var vRow = this.id.substr(this.id.indexOf('_')+1);
I am using classic report.
Any idea?
Thanks.
Regards,
Dejan.