2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2020

01/10/2003: Toggling Background Color When Checkbox is Checked

Toggling Background Color When Checkbox is Checked

<script language="javascript">
  function toggleRowColor(cb, row) {
    if (navigator.appName != "Netscape") {
      if (cb.checked == true) {
        eval("top.row" + row + ".style.background = '#d1e6f9';");
      } else {
        eval("top.row" + row + ".style.background = '#ffffff';");
      }
    }
}
</script>

<tr id="row2" bgcolor="#ffffff"><td>
  <input type="checkbox" name='senderid' value='931904' onclick="toggleRowColor(this, 2)">
</td></tr>

01/10/2003: How to set the root cause when throwing an exception

How to set the root cause when throwing an exception

NamingException ne = new NamingException("foo bar blah blah");
ne.setRootCause(e);
throw ne;