josh hes.
2006-Aug-09 21:03 UTC
[Rails] Scriptaculous blind up effect not working from innerhtml in IE? Help please.
I have some tables wrapped in divs, when you click them, they are hidden and then some of the data is added as a div into another div by way of innerhtml. When you you click on these new divs that are in the html, they should go away. This works fine in Firefox but doesn''t work at all in IE. Does anyone have any ideas? The weird thing is if I take the source of the html after the innerhtml is generated and save it as a file, the removerecips function works fine. Here is this source: <html><head> <script src="prototype.js" type="text/javascript"></script> <script src="scriptaculous.js" type="text/javascript"></script> <script src="unittest.js" type="text/javascript"></script> <script src="effects.js" type="text/javascript"></script> <script language="javascript"> var i = 0; var arrItems = new Array(); </script> <body> <strong>Search Results</strong> <table cellpadding="2" cellspacing="3" width="894"> <tbody><tr> <td width = "55"></td> <td width = "155" align="center"><strong>Name</strong></td> <td width = "155" align="center"><strong>User ID</strong></td> <td width = "155" align="center"><strong>SSN</strong></td> <td width = "155" align="center"><strong>DOB</strong></td> <td width = "215" align="center"><strong>Email</strong></td> </tr> </tbody></table> <div id= "a526" onclick="addtorecips(''a526'',''Jane'')"> <table cellpadding="2" cellspacing="3" width="894"><tbody> <tr bgcolor="#f4f4f4"> <td width = "50" align="center"> <input name="selectedMemberId" value="526" type="radio"> </td> <td width = "156" align="center"> Jane Doe </td> <td width = "156" align="center"> JDoe4766 </td> <td width = "156" align="center"> 1111 </td> <td width = "156" align="center"> 1964-01-01 </td> <td width = "216" align="center"> noreply@medfusion.net </td> </tr> </tbody></table> </div> <div id= "a527" onclick="addtorecips(''a527'',''James'')"> <table cellpadding="2" cellspacing="3" width="894"><tbody> <tr bgcolor="#f4f4f4"> <td width = "50" align="center"> <input name="selectedMemberId" value="527" type="radio"> </td> <td width = "156" align="center"> James Doe </td> <td width = "156" align="center"> J6666666 </td> <td width = "156" align="center"> 1111 </td> <td width = "156" align="center"> 1964-01-01 </td> <td width = "216" align="center"> noreply@medfusion.net </td> </tr> </tbody></table> </div> <div id= "a528" onclick="addtorecips(''a528'',''Josh'')"> <table cellpadding="2" cellspacing="3" width="894"><tbody> <tr bgcolor="#f4f4f4"> <td width = "50" align="center"> <input name="selectedMemberId" value="528" type="radio"> </td> <td width = "156" align="center"> Josh Doe </td> <td width = "156" align="center"> J77777 </td> <td width = "156" align="center"> 1111 </td> <td width = "156" align="center"> 1964-01-01 </td> <td width = "216" align="center"> noreply@medfusion.net </td> </tr> </tbody></table> </div> <script language="javascript"> function addtorecips(value,name) { new Effect.BlindUp(value, {duration: .3}); document.getElementById("garbagebin").innerHTML += "<div onclick=\"removefromrecips(this)\" id=\"b"+i+"\" style=\"display: none;\")>"+name+"</div>"; new Effect.Appear("b"+i, {duration: .3}); i++; } function removefromrecips(value) { new Effect.BlindUp(this, {duration: .3}); } function alertrecips() { alert(arrItems); } var arrItems = new Array(); </script> <style> #garbagebin { border: 1px #000000 solid; background-color: #efefef; padding: 10px; width: 250px; }</style> </head> <body> Selected Recipients: <div id="garbagebin"> </div> <FORM Method="POST" Action= "alertrecips();"> <input type="button" name="next" value="Next" onclick="alertrecips();"> </FORM> </body></html> __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com