ListBox OnChangeEvent

Results 1 to 2 of 2

Thread: ListBox OnChangeEvent

  1. #1
    Join Date
    Dec 1969

    Default ListBox OnChangeEvent

    hi...i 2 list boxes..<BR>and i want that when user clicks one listbox item, the other listbox&#039;s same item gets selected too,,<BR>i understand that i need OnChange event for this, since ASP.NET doesnt have this event i will have to use javascript<BR>so can anyone pls tell me how to incorporate javascript function in ASP.NET to do the above??<BR>i dont know how to write the javascript to select the other listbox&#039;s same item nor do i know how to make the Javascript function be called by ASP.NET listbox when IT IS Clicked!<BR>ca someone pls help???<BR>tks a lot...

  2. #2
    Join Date
    Dec 1969

    Default Here's the basics

    Ok so you can add an attribute to your textbox in your code with<BR><BR>myTextBox.Attributes.add("onClick","my JavascriptFunction")<BR><BR>Then in your javascript function I would suggest you look at a property called getElementById which will allow you to get an element in your form (your second listbox) and do something to it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts