Re: Javascript not included on Ajax.Request
Thanks for the feedback, you guys! I did some more research, and found that Ajax.Updater actually is better, it does everything that I've done manually until now. And in addition, it has an "evalScripts" option, which claims pass all
Re: Javascript not included on Ajax.Request
i dont know if i get your problem right, but if the tapestry.js is available, you can use some of its magic: the value of the key "script" will be evaluated by the tapestry.js! JSonObject j = new JSonObject(); j.put("script", "alert('hi!');"); return j; regards christian cordenier christophe schrieb: Hi If you only append content i don't think it will work. Have a look at how Tapestry achieve JS loading in loadScriptsInReply method of 'tapestry.js' file. christophe. 2009/10/9 Inge Solvoll Hi! I use prototype Ajax.Request to load a tapestry page url into a non-tapestry page. The response content is appended to the document with javascript. My problem is that javascript that is included in the tapestry page seems to not be included/interpreted in the browser when the content is received via XmlHttpRequest. It all works if I do a normal page render. Is this supposed to work, or do I have to find some other approach? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Javascript not included on Ajax.Request
Hi If you only append content i don't think it will work. Have a look at how Tapestry achieve JS loading in loadScriptsInReply method of 'tapestry.js' file. christophe. 2009/10/9 Inge Solvoll > Hi! > > I use prototype Ajax.Request to load a tapestry page url into a > non-tapestry > page. The response content is appended to the document with javascript. > > My problem is that javascript that is included in the tapestry page seems > to > not be included/interpreted in the browser when the content is received via > XmlHttpRequest. It all works if I do a normal page render. > > Is this supposed to work, or do I have to find some other approach? >
Re: Javascript not included on Ajax.Request
That's normal - you need to look at the prototype docs to see if there's a helper function that will run the scripts of an ajax response... or if there's a helper that appends html to the current document AND executes the included (in that html) scripts. I know dojo has something similar, perhaps prototype has that too On Fri, Oct 9, 2009 at 6:18 PM, Inge Solvoll wrote: > Hi! > > I use prototype Ajax.Request to load a tapestry page url into a non-tapestry > page. The response content is appended to the document with javascript. > > My problem is that javascript that is included in the tapestry page seems to > not be included/interpreted in the browser when the content is received via > XmlHttpRequest. It all works if I do a normal page render. > > Is this supposed to work, or do I have to find some other approach? > -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org