auto_complete :on_show :on_hide

Hi,

Trying to use the auto_complete options of :on_show and :on_hide....

......, :on_hide => "function(element, update) {allow_change_control(true);} "

but when I do this it runs my js function but the div doesn't hide.

I would like the auto_complete to work normally and just run a js function which sets a js variable.

Any suggestions

Thanks