Jump to content

[SOLVED] changing class


ratcateme

Recommended Posts

i have this table when i click on a line the tick box is checked and a new style is applied to change the background

this is my form

Code:

 

<table>
  <tr class="normal" onmousedown="if(document.getElementById('check_15569').checked==true){ document.getElementById('check_15569').checked=false; alert(this.class); this.class=''; alert(this.class); }else{ document.getElementById('check_15569').checked=true; alert(this.class); this.class='normal_checked'; alert(this.class); }document.getElementById('check_15569').checked">
    <td><input type="checkbox" name="rows_selected[]" value="15569" id="check_15569" /></td>
    <td>10.1.1.2</td>
    <td>2008/02/03 07:37 PM</td>
    <td>GET</td>
    <td>/update_logs.php</td>
    <td>200</td>

    <td>27</td>
    <td>Firefox 2.0</td>
  </tr>
</table>

 

The tick box get ticked but i get undefined on the first alert and the class i am trying to change to in the second alert

i am trying to create a display somewhat like phpMyAdmin if this helps

 

Scott.

Link to comment
https://forums.phpfreaks.com/topic/89176-solved-changing-class/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.