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. Requirement in Drop down list

Requirement in Drop down list

Scheduled Pinned Locked Moved ASP.NET
csharpalgorithmshelpquestionannouncement
21 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.
  • M Michael Sync

    Hi Hariharan, It's good to hear that. If my script works for you, don't forget to vote my message. :) thanks. Instead of using static name "DropDownList1", you should probably pass this name as the parameter. so, it will work if you have more than one dropdown. var selectList = document.getElementById('DropDownList1'); This variable holds only one value. maybe. you can add more variables. or you can handle this variable to hold the value depend on what the user is typing. var pressedKeyString = ""; Hope it helps.

    Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. :)

    H Offline
    H Offline
    Hari_1010
    wrote on last edited by
    #21

    Hi Michael, In the function "foo(event,id)", can you tell me what is the use of the event. See in my website I got this dropdown list in a formview insert template where it bound to the object data source. I have added your script to my master page. And the function calling is as follows, protected void FormView1_DataBound(object sender, EventArgs e) { switch (FormView1.CurrentMode) { case FormViewMode.Insert: ((DropDownList)FormView1.FindControl("DropDownList3")).Attributes.Add ("onkeypress", "javascript:return foo(event,'ctl00_ContentPlaceHolder1_FormView1_DropDownList3');"); break; } } But its not working in my page. So can you please help me on this. Dont worry Michael defenitely i am going to vote for you. Thanks in advance. Thanks and Regards, Hariharan C

    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