View Single Post
Old 10-03-2007, 09:39 PM   #7 (permalink)
CMellor
The Acquainted
Upcoming Programmer 
 
CMellor's Avatar
 
Join Date: Sep 2007
Location: Leeds, UK
Posts: 141
Thanks: 6
CMellor is on a distinguished road
Default

I've just realised that this doesn't work in Internet Explorer... what's new eh?

I did a slight modification than the code Wildhoney provided:

Code:
<script type="text/javascript">
  var bgColor = '#CCCCCC';
  var bgColorOrig = '#F3F3F3';
  {literal}
  // Change table row on checkbox click
  function colorRow(pTarget) {
    var pTR = pTarget.parentNode.parentNode;
    				
    if(pTarget.checked == true) {
      pTR.setStyle({backgroundColor: bgColor});
      $('delete_pm').enable();
    }
    else {
      pTR.setStyle({backgroundColor: bgColorOrig});
        $('delete_pm').disable();
    }
  }
{/literal}
</script>
Basically just uses Prototype functions instead of normal Javascript. In IE, when I click the checkbox, the colour doesn't change and the submit button stays disabled.

I hate IE sometimes...
__________________
Not quite a n00b...
CMellor is offline  
Reply With Quote