Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. jQuery Autocomplete Failed

jQuery Autocomplete Failed

Scheduled Pinned Locked Moved ASP.NET
javascriptcsswpftoolshelp
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    awedaonline
    wrote on last edited by
    #1

    Hello,

    I am having a challenge of using jQueryAutoComplete in my webforms. The problem is when I have selected an item from the suggested items in the textbox, fill other form fields as required, then submits the form, every is fine. But I cannot get the autocomplete working anylonger to process a new entry. What could have been the course of this? See how I did it

    <link rel="stylesheet" type="text/css" href="../../Styles/jquery.autocomplete.css" />
    <script src="../../Scripts/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/jquery-1.4.1.min.js"></script>
    <script src="../../Scripts/jquery.autocomplete.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    $("#<%=staffNameTextBox.ClientID%>").autocomplete('../../AutoSuggest/SuggestStaffName.ashx');
    });
    </script>

    B J 2 Replies Last reply
    0
    • A awedaonline

      Hello,

      I am having a challenge of using jQueryAutoComplete in my webforms. The problem is when I have selected an item from the suggested items in the textbox, fill other form fields as required, then submits the form, every is fine. But I cannot get the autocomplete working anylonger to process a new entry. What could have been the course of this? See how I did it

      <link rel="stylesheet" type="text/css" href="../../Styles/jquery.autocomplete.css" />
      <script src="../../Scripts/jquery.min.js" type="text/javascript"></script>
      <script type="text/javascript" src="../../Scripts/jquery-1.4.1.min.js"></script>
      <script src="../../Scripts/jquery.autocomplete.js" type="text/javascript"></script>
      <script type="text/javascript">
      $(document).ready(function () {
      $("#<%=staffNameTextBox.ClientID%>").autocomplete('../../AutoSuggest/SuggestStaffName.ashx');
      });
      </script>

      B Offline
      B Offline
      Bryian Tan
      wrote on last edited by
      #2

      Will it work after you refresh the page manually?

      A 1 Reply Last reply
      0
      • A awedaonline

        Hello,

        I am having a challenge of using jQueryAutoComplete in my webforms. The problem is when I have selected an item from the suggested items in the textbox, fill other form fields as required, then submits the form, every is fine. But I cannot get the autocomplete working anylonger to process a new entry. What could have been the course of this? See how I did it

        <link rel="stylesheet" type="text/css" href="../../Styles/jquery.autocomplete.css" />
        <script src="../../Scripts/jquery.min.js" type="text/javascript"></script>
        <script type="text/javascript" src="../../Scripts/jquery-1.4.1.min.js"></script>
        <script src="../../Scripts/jquery.autocomplete.js" type="text/javascript"></script>
        <script type="text/javascript">
        $(document).ready(function () {
        $("#<%=staffNameTextBox.ClientID%>").autocomplete('../../AutoSuggest/SuggestStaffName.ashx');
        });
        </script>

        J Offline
        J Offline
        jkirkerx
        wrote on last edited by
        #3

        The Dom wasn't ready after the postback, thus the conditional statement which roughly states if DOM is ready then run autocomplete.

        $(document).ready(function () {

        I suspect that you loaded your JQuery in the wrong section, probably needs to be inside the body or form tags, at the bottom after the textbox objects are created, so the Jquery has something to attach to.

        A 1 Reply Last reply
        0
        • B Bryian Tan

          Will it work after you refresh the page manually?

          A Offline
          A Offline
          awedaonline
          wrote on last edited by
          #4

          No. It only works once and after postback, it stops working

          1 Reply Last reply
          0
          • J jkirkerx

            The Dom wasn't ready after the postback, thus the conditional statement which roughly states if DOM is ready then run autocomplete.

            $(document).ready(function () {

            I suspect that you loaded your JQuery in the wrong section, probably needs to be inside the body or form tags, at the bottom after the textbox objects are created, so the Jquery has something to attach to.

            A Offline
            A Offline
            awedaonline
            wrote on last edited by
            #5

            Okay, I will try your suggestion. Thanks.

            J 1 Reply Last reply
            0
            • A awedaonline

              Okay, I will try your suggestion. Thanks.

              J Offline
              J Offline
              jkirkerx
              wrote on last edited by
              #6

              You point to JQuery or any other JQuery add-on in the head tag

              // HTML Code

              // place code here

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups