I think your problem is here: alert('Help!');
You are using ' to delimit the Help string, but also to delimit the out.push string, at the same time. So you are escaping the string and passing Help! as a variable instead of a string. try escaping the 's with \ cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-828-355-5544 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: Rick Faircloth <r...@whitestonemedia.com> To: jquery-en@googlegroups.com Date: 04/22/2009 09:17 AM Subject: [jQuery] Why would adding this onclick alert cause this code to fail??? Without going into a lot of other code which could be impacting this, I wanted to start with this question: Is there any reason why adding this onclick alert to this line of code would cause the entire block of code generated using out.push to fail? (onclick is in the top line)... out.push('<div style="margin-top:12px;">[ <a class="link" onclick="alert ('Help!');">save changes</a> ] <input id="' + row[2] + '" class="saveChangesButton" name="button" type="button" value="Save Changes"> <input id="cancelChangesButton" type="button" value=" Cancel "></div>'); If I take out the onclick, the all the out.push code block section, of which this is a part, runs fine. Put it in, the entire code block fails to display. I was just wondering if there something inherently different about using this onclick script as part of injected code. Also, using the onclick anywhere else on the page (outside of the out.push generated code block) work normally. Thanks for any insight! Rick ----------------------------------------------------------------------------------------------------------------------------------------------------------------- "It has been my experience that most bad government is the result of too much government." - Thomas Jefferson
<<inline: graycol.gif>>
<<inline: ecblank.gif>>