Your totally removing the onclick, so when your trying to modify it, it no longer exists. function show_hidden_row(id,a_id){ $(id).show(); $(a_id).attr("onclick","hide_shown_row('"+id+"','"+a_id+"')"); $(a_id).html('<img src="images/minus.png" alt="hide" border="0" />'); }
--- On Sun, 8/24/08, Sarbesh <[EMAIL PROTECTED]> wrote: From: Sarbesh <[EMAIL PROTECTED]> Subject: [jQuery] attr('onclick','') problem on ie6 To: "jQuery (English)" <jquery-en@googlegroups.com> Date: Sunday, August 24, 2008, 7:41 AM Hi, i'm new to jquery and i'm having some problem. the code below works fine in FF3.0 but doesn't work with IE 6.0. i used it to show and hide table row when user click the show/hide icon id and a_id are dynamic ids. id will be something like #23, and a_id like #id_23 function show_hidden_row(id,a_id){ $(id).show(); $(a_id).removeAttr("onclick"); $(a_id).attr("onclick","hide_shown_row('"+id+"','"+a_id+"')"); $(a_id).html('<img src="images/minus.png" alt="hide" border="0" />'); } function hide_shown_row(id,a_id){ $(id).hide(); $(a_id).removeAttr("onclick"); $(a_id).attr("onclick","show_hidden_row('"+id+"','"+a_id+"')"); $(a_id).html('<img src="images/plus.png" alt="show" border="0" />'); } Can anybody please help me to fix this problem.