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
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',
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
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.
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
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
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