J
|
Jane 11/25/2009 |
Dale, $record["checkbox_attrs"].=" onchange='if ($(\"input[@type=checkbox][@checked][@name^=selection]\").length) {//show tool bar} else {//hide tool bar}' "; |
D
|
Dale author 11/25/2009 |
Thanks Jane, |
A
|
aalekizoglou 11/26/2009 |
DaleM, Thanks Jane, It worked as you suggested. BUT, I had to abandon the using of After Record Processed method. You may want to look into this further, but I found that using this method, Phprunner was NOT applying the onchange to the checkbox_attrs on the first row when the list was produced. All subsequent rows had the added onchange event. Just not the first one. But you gave me the hint I needed to make my method work. I used the value input[@type=checkbox][@checked][@name^=selection]\").length in my IF condition in a toggle_icons function. I list.htm and added a onclick event on the table cell holding the checkbox. <td onclick="javascript: toggle_icons();"> So whenever a user clicks the checkbox on the row, it runs the script. I modified the lheader.htm and added a <span onclick="javascript: toggle_icons();"> </span> around the select all toolbar Icon. Last, I modified the list.php in the source and added the toggle_icons() function the the end of the bselect=!belected function. It all works perfectly now. Thankyou for the tip. |
D
|
Dale author 11/27/2009 |
Sent pm |