Re: Replace panel+javaScript functions doesn't work

2010-05-17 Thread Jeremy Thomerson
In the page put: function initMyDatePickers() { $('#initialDate').datepicker({ changeMonth: true, changeYear: true, showOn: 'button', buttonImage: 'views/images/calendar.jpg', buttonImageOnly: true }); } $(document).ready(initMyDatePicker); Then, in AjaxReq

Re: Replace panel+javaScript functions doesn't work

2010-05-17 Thread Ivoneta
The first time the datepicker field is initialized when the DOM is ready $(document).ready(function(){ $('#initialDate').datepicker({ changeMonth: true, changeYear: true, showOn: 'button', buttonImage: 'views/images/calendar.jpg',

Re: Replace panel+javaScript functions doesn't work

2010-05-17 Thread Jeremy Thomerson
Do you use certain classes which cause the date pickers to be automatically initialized? Try adding this to AjaxRequestTarget#appendJavascript: " $('.selector').datepicker()". The selector obviously needs to be a valid jQuery selector. -- Jeremy Thomerson http://www.wickettraining.com On Mon

Re: Replace panel+javaScript functions doesn't work

2010-05-17 Thread Ivoneta
in the html for the webPage, I have this FrontEnd Seguros http://apache-wicket.1842946.n4.nabble.com/Replace-panel-javaScript-functions-doesn-t-work-tp2220030p2220086.

Re: Replace panel+javaScript functions doesn't work

2010-05-17 Thread Zilvinas Vilutis
Well javascript should work, maybe the markup ids are changed and JS references non-existing elements or so. It's nothing clear from the markup you gave. What panel do you replace? What JS is invoked or what elements are used in JS are inside the panel? Žilvinas Vilutis Mobile: (+370) 652 383

Re: Replace panel+javaScript functions doesn't work

2010-05-17 Thread Jeremy Thomerson
I'll guess, even though you don't mention it, that you are doing some JS initialization when the page first loads (like making a section of the page an accordion panel). Then you replace this section with a new one and don't reinitialize your JS stuff. You need to do AjaxRequestTarget#appendJavas

Replace panel+javaScript functions doesn't work

2010-05-17 Thread Ivoneta
Hello I have a panel with an ajax button. When the button is clicked the ajax event replace the current panel. I don't understand why after replaces the panel, the javascripts functions doesn't work. I added the javascript resources in the head of my webpage, in the traditional way