Question

I want to use a autocomplete combobox http://jqueryui.com/demos/autocomplete/#combobox within a modal dialog. However whenever I click on the down arrow (of the combobox) it causes a refresh that results in my modal window closing.

How do I stop the refresh from occuring? (I am still new to jQuery)

I am using UI 1.8 and jQuery 1.4.1.

Was it helpful?

Solution 2

Ok I fixed my own problem by removing the form tag from around the combobox

OTHER TIPS

The problem is discussed on the jQuery forum here: http://forum.jquery.com/topic/autocomplete-combobox-problem-when-it-is-placed-inside-a-form-tag

They suggest several different ways of adjusting the source code of the autocomplete combo to fix it. The simplest one seems to be this:

Change the line that says

$("<button>&nbsp;</button>") 

to

$("<button type=\"button\">&nbsp;</button>")

this prevents the type="submit" from being inserted into the final button.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top