• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

ajax dropdown search

Hi,
I want to create a search functionality wherein user types in a key and it shows a drop down with matching names. I dont want to use a webservice call or remoting.. How can this be achieved. can some examples be posted
0
dotnet0824
Asked:
dotnet0824
  • 4
  • 2
1 Solution
 
McExpCommented:
may I be so bold as to ask why you don't want to use webservices?

So you want to have a purly client side auto complete box?

WHy not just use a normal dropdown list? If you select the list and start typing you will find it will seek to the item matching the value you require.
0
 
dotnet0824Author Commented:
but that needs a post back everytime u type in
0
 
McExpCommented:
what needs a postback?
0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
McExpCommented:
View the code below in your browser to see the simple solution: -
To test just select the text box and start typing.

typing BBC will take you straight to the last item

<html>
<body>
  <select>
    <option value="1">AAA</option>
    <option value="2">AAB</option>
    <option value="3">BAA</option>
    <option value="4">BBA</option>
    <option value="5">BBC</option>
  </select>
</body>
</html>
0
 
dotnet0824Author Commented:
Other than ajax speaking, for each and key press of keyword page needs to go back to the server
0
 
McExpCommented:
but i've not offerd a solution that uses autoPostBack, all the modern browsers will automatically search through a list on keypress whenb using the select (DropDownList) control.

If you are going to use a client side only solution why not just use a DropDownList?
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now