1

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.

1
  • In my case it is the autocomplete that closes, not the modal dialog. Will your solution be helpful? Commented Apr 1, 2010 at 8:43

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I am using jqueryui-1.8.7.js and jquery-1.7.js
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.