Re: Make wicket aware of loaded javascript
Hi, It should work. It won't work if the appended JS is executed in a different context, e.g. inside an iframe (a ModalWindow with a Page). Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Sat, Sep 27, 2014 at 2:36 PM, Mathias Nilsson < wicket.program...@gmail.com> wrote: > Hi, > > I have a javascript function already loaded when the first page loads. When > adding a new Panel thru ajax I add target.appendJavascript afterwards but I > get Exception evaluating javascript: ReferenceError: deselectAll is not > defined. > > I know that the script is there. I must be missing something. Any > pointers? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Make-wicket-aware-of-loaded-javascript-tp4667733.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Make wicket aware of loaded javascript
Hi, maybe you are refreshing th dom via AJAX and you loose previously defined js functions. What components do you refresh when you add panel via AJAX? Hi, I have a javascript function already loaded when the first page loads. When adding a new Panel thru ajax I add target.appendJavascript afterwards but I get Exception evaluating javascript: ReferenceError: deselectAll is not defined. I know that the script is there. I must be missing something. Any pointers? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Make-wicket-aware-of-loaded-javascript-tp4667733.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Make wicket aware of loaded javascript
Hi, I have a javascript function already loaded when the first page loads. When adding a new Panel thru ajax I add target.appendJavascript afterwards but I get Exception evaluating javascript: ReferenceError: deselectAll is not defined. I know that the script is there. I must be missing something. Any pointers? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Make-wicket-aware-of-loaded-javascript-tp4667733.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org