Hello,
I want to create a functionality similar to what www.redfin.com has on their search page. A search form is opened as a user clicks in the text box.
I am using MVC and jQuery but am not sure how to go about it. I tried using the Dialog plugin but for some reason the dialog only opens once.
<input id="txtSearch" type="text" />
<div id="searchForm" title="Dialog Title">I am a dialog</div>
$("#txtSearch").click(function() {
// Show form
$("#searchForm").dialog();
});
However, in a regular web site the dialog does not even open.
$("#txtSearch").click(function() {
// Show form
$("#searchForm").dialog();
});
Using focus or click seem to have the same effect. The dialog only opens once. When I close it and click in the text box again there is no dialog.
Am I using the right approach to accomplish this task? Are there any samples? Suggestions welcome.
The dialog might not be best choice, since it creates the title. I was wondering what else I can use since I will also want to post the form via ajax and display results on the same page.
Thanks