Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6164137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:56:33+00:00 2026-05-23T21:56:33+00:00

I have a jquery example that works when i enter letters but does not

  • 0

I have a jquery example that works when i enter letters but does not work when i enter numbers:

<script>
    $(function() {
        $("#box1").autocomplete({
            url: 'test-search3.ashx?s=mrn'
        });
    });
</script>

<form>
 <input type="text" id="box1">
</form>

Here is the code for the ashx page:

<%@ WebHandler Language="VB" Class="test_search" %>
Imports System
Imports System.Web
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Text

Public Class test_search : Implements IHttpHandler

    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
        context.Response.ContentType = "text/plain"
        Dim qString As String = context.Request.QueryString("q")
        Dim typeString As String = context.Request.QueryString("s")
        Dim sqlStr As String = ""

        Try
            Dim conn As SqlConnection = New SqlConnection
            conn.ConnectionString = ConfigurationManager.ConnectionStrings("connString").ConnectionString
            Dim cmd As SqlCommand = New SqlCommand
            If typeString = "mrn" Then               
                sqlStr = "select Pat_ID, Name=LastName + ', ' + FirstName " & _
                " from Patients p Where Active=1 " & _
                " and p.MRN like '" & qString & "%' order by lastname"
            Else
                sqlStr = "select Pat_ID, Name=LastName + ', ' + FirstName " & _
                " from Patients p Where Active=1 " & _
                " and Lower(LastName) like '" & qString & "%' order by lastname"
            End If

            cmd.CommandText = (sqlStr)
            cmd.Connection = conn
            Dim sb As StringBuilder = New StringBuilder
            conn.Open()
            Dim sdr As SqlDataReader = cmd.ExecuteReader
            'sb.Append(qString & "/" & typeString).Append(Environment.NewLine)
            While sdr.Read
                sb.Append(sdr("Name") & "|" & sdr("Pat_ID")).Append(Environment.NewLine)
            End While
            conn.Close()
            context.Response.Write(sb.ToString)
        Catch ex As Exception
            context.Response.Write("Error: " & ex.ToString)
        End Try

    End Sub

    Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
        Get
            Return False
        End Get
    End Property

End Class
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:56:33+00:00Added an answer on May 23, 2026 at 9:56 pm

    There are lot of jquery autocomplete plugins which work fairly well.

    This plugin is a good one.

    For other jQuery Plugins.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Do you have any link\example of Greasemonkey script with Jquery that works in Google
Does jQuery validation plugin have some dependencies? For example, I saw blogposts that said
I have written a jQuery image resize script that works fine when the images
I want to make a javascript (or jquery) function that works onChange and allow
I have created a jQuery plugin that works great with the exception of being
I want to know that when we have a function with parameters that works
How can I delay actions between keypress in jQuery. For example; I have something
I have jQuery to select all font elements that are children of the element
I have jquery validation code which is working fine in ff but the same
I'm struggling to find the right terminology here, but if you have jQuery object...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.