Loading the autocomplete widget when ajaxButton is clicked

I have the following

I have a ajaxButton in a form view so when I press this ajax button the following autocomplete code should load












This however loads but somehow the autocomplete funtion does not work, if I paste this widget directly in the view it works, now I can’t understand why the autocomplete does not want to work when I click on the button and only the text box appears? Am I doing something wrong?

Please paste all code snippets.

Use firebug and debug to determine if ‘booking/autoCompleteLookupSets’ function get the calls.