Thanks, Michael!  That was it!

That was driving me crazy!  [?]

Rick

On Wed, Apr 22, 2009 at 9:23 AM, Michael Lawson <[email protected]> wrote:

> 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: [email protected]
>
> '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.'
>
> [image: Inactive hide details for Rick Faircloth ---04/22/2009 09:17:53
> AM---Without going into a lot of other code which could be impa]Rick
> Faircloth ---04/22/2009 09:17:53 AM---Without going into a lot of other code
> which could be impacting this, I wanted to start with this question:
>
>
> From:
> Rick Faircloth <[email protected]>
> To:
> [email protected]
> 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">&nbsp;&nbsp;
> <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
>
>


-- 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
"It has been my experience that most bad government is the result of too
much government." - Thomas Jefferson

<<graycol.gif>>

<<ecblank.gif>>

<<361.gif>>

Reply via email to