No, Its should work. Maybe you get some JS error, please check. Becoder.
On Tue, Oct 20, 2009 at 7:43 AM, Kiswono Prayogo <kisw...@gmail.com> wrote: > why don't you use this instead:$("#test").html("<p>Hi there > "+username+".</p>"); > > > On Mon, Oct 19, 2009 at 10:06 PM, Ron <ronmichael.zettlemo...@gmail.com>wrote: > >> >> Hi all. I stumbled upon something which may be by design in jQuery >> for security reasons, it may be the browsers doing it, but... I found >> that any JavaScript I try to put into the html of an object is >> ignored. For example, say username is a variable that was already >> defined with the user's name: >> >> $("#test").html("<p>Hi there <script type='text/ >> javascript'>document.write(username);</script>.</p>"); >> >> All the script is just stripped out, in both IE and Firefox. >> >> Any ideas what is going on? >> > >