webtier@glassfish.java.net

Re: [webtier] JSF2: using JavaScript to update a component

From: <webtier_at_javadesktop.org>
Date: Tue, 01 Sep 2009 15:34:06 PDT

> Jim,
> Here's a rundown of yesterday's experiences with the
> Aug28 nightly build.
>
> #1: It doesn't seem to be executing my JavaScript. My
> renderer writes something like this:
>
> &lt;div id="diagram" ... &gt; ... html here
> ...&lt;/div&gt; &lt;script&gt; ... javascript here
> ... &lt;/script&gt;
>
> I tried putting the script inside the div, but to no
> avail. The subtree does get replaced though, and the
> responseText on the client side looks good.

OK, this should work, so I'd like to concentrate on this for now.

First, what browser? Have you tried it in more than one? Have you tried something simple like alert("it works"); in your inline script? (You're missing type="text/javascript", but I don't think that will cause a failure, even in Firefox.)

If you could give me the [b]exact[/b] text of the response, I can try to see what's happening.
[Message sent by forum member 'driscoll' (jim.driscoll_at_sun.com)]

http://forums.java.net/jive/thread.jspa?messageID=362642