Kropp, Henning wrote:
Hi,

I am a little stuck here. A action loads a jsp into a div. For this I use the ajax theme (dojo) and a form submit with target. Works fine. The Problem ist, that the jsp returned by the action has javascript in it. Its the jcalendar. Having this jsp load normally the calendar works fine, but not in div.

To solve this I tried executeScripts option, but that did not work. I searched and found out that eval might help, but I simply dont know how this could help.

Any hints would be greatly appreciated.  Many thanks in advanced!

Ensure separateScripts is also true.

Cut back the javascript to the bare minmial first (eg. an alert). A lot of javascript has problems in this scenario because it assumes the DOM is complete or won't change before it's executed. I think dojo updates the DOM, the executes discovered scripts, but in some browsers you can get race conditions. eg. calls getElementById before that element exists properly (eg. exists and all its content exists).

The best approach is to use a listener that initialises the javascript calendar only after it's certain the DOM is up-to-date, rather than using inline javascript in the result..

Hope that helps.

Jeromy Evans








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to