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. Browser AutoComplete Not working in IE 8

Browser AutoComplete Not working in IE 8

Scheduled Pinned Locked Moved ASP.NET
help
2 Posts 2 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.
  • R Offline
    R Offline
    raghvendrapanda
    wrote on last edited by
    #1

    I am using a .ascx page in a aspx page. The ascx page contains a textbox and a search button. The Enter key was not working with search but when we put following line textboxsearchInput.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnSearch.ClientID + "').click();return false;}} else {return true}; "); on the page load method of the ascx page the Enter key starts working but now the auto complete functionality of the text box is not working, When we go to any option in the auto complete drop down and press Enter the form is submitted without considering that option. Please help if any one have some idea.

    S 1 Reply Last reply
    0
    • R raghvendrapanda

      I am using a .ascx page in a aspx page. The ascx page contains a textbox and a search button. The Enter key was not working with search but when we put following line textboxsearchInput.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + btnSearch.ClientID + "').click();return false;}} else {return true}; "); on the page load method of the ascx page the Enter key starts working but now the auto complete functionality of the text box is not working, When we go to any option in the auto complete drop down and press Enter the form is submitted without considering that option. Please help if any one have some idea.

      S Offline
      S Offline
      Sunasara Imdadhusen
      wrote on last edited by
      #2

      You can set Default Button instead of assign Click Event of textbox just add the following code:

      <asp:Panel runat="server" ID="pnlSearch" DefaultButton="btnSearch">
      <asp:TextBox runat="server" ID="txtSearch"></asp:TextBox>
      <asp:Button runat="server" ID="btnSearch" />
      </asp:Panel>

      Thanks, Imdadhusen

      sunaSaRa Imdadhusen +91 99095 44184

      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