# Auto\_complete :on\_show :on\_hide

**URL:** <https://www.ruby-forum.com/t/auto-complete-on-show-on-hide/116738>\
**Category:** Rails\
**Created:** [October 9, 2007, 6:50am UTC](https://www.ruby-forum.com/t/auto-complete-on-show-on-hide/116738 "2007-10-09T06:50:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nigel.bris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/e95f7d/32.png) [@nigel.bris](https://www.ruby-forum.com/u/nigel.bris)\
**Post date:** [October 9, 2007, 6:50am UTC](https://www.ruby-forum.com/t/auto-complete-on-show-on-hide/116738/1 "2007-10-09T06:50:08Z")

</div>

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
