I have a dynamic generated table that has this format:
----------------------------------
- Column1 - Column2 - Column 3 -
----------------------------------
- - - -
----------------------------------
- - - -
----------------------------------
- - - -
----------------------------------
- - - -
----------------------------------
-
-
-
----------------------------------
- - - -
----------------------------------
3 columns, n rows
Content from Column2:
Content from Column3:Code:echo "<td height=\"25px\">"; if ($status[$user[$i_line]]==0) { echo '<img src="red-status.gif" width="20" height="20">'; echo " Disabled"; } else { echo '<img src="green-status.gif" width="20" height="20">'; echo " Enabled"; $counter1++; }
where:Code:echo "<td height=\"25px\">"; if ($status[$user[$i_line]]==0) echo "<center><form class=\"shell\" name=\"groovyform".$i_line."\"> <input type=\"button\" name=\"groovybtn1\" class=\"groovybutton\" value=\"Enable SecureJailShell\" onMouseOver=\"goLite(this.form.name,this.name)\" onMouseOut=\"goDim(this.form.name,this.name)\"></form></center>"; else echo "<center><form class=\"shell\" name=\"groovyform2".$i_line."\"> <input type=\"button\" name=\"groovybtn1\" class=\"groovybutton\" value=\"Disable SecureJailShell\" onMouseOver=\"goLite(this.form.name,this.name)\" onMouseOut=\"goDim(this.form.name,this.name)\"></form></center>"; <script language="javascript"> function goLite(FRM,BTN){ window.document.forms[FRM].elements[BTN].style.color = "#CC9900";} function goDim(FRM,BTN){ window.document.forms[FRM].elements[BTN].style.color = "#FFFFCC";} </script>
where $d = dir("..."); (sample)Code:$counter = 0; $counter1 = 0; $shell = 0; $users = array(); $value = 0; while(false !== ($e = $d->read())) { if ($e != "." && $e != "..") $user[] = $e; $status[$e] = $shell; }
I would need some help to imprelement an OnMouseClick action that should do the following:
So this action should affect both: the button from Column3, where the action should be added; and the value from Column2Code:if value = Enable SecureJailShell { change value to Disable SecureJailShell; change $status[$user[$i_line]] to 1 } if value = Disable SecureJailShell { change value to Enable SecureJailShell; change $status[$user[$i_line]] to 0 }
Could someone please help me?




Reply With Quote