Click here to Skip to main content
13,247,674 members (55,917 online)
Rate this:
Please Sign up or sign in to vote.
See more:
i am having a dropdownlist which populates some data

if i mouseover on any list items i have to fire one javascript function and replace the label value (only onmouseover not onchange,onclick) cracking for 2 days

i am using 1.1

any help

will be greatly appreciated
Posted 5-Feb-13 3:27am
Krunal Rohit 5-Feb-13 8:32am
Let us know what you've cracked so far !
ryanb31 5-Feb-13 8:43am 1.1? Are you sure?
Have you searched for the onmouseover event for a dropdown? Where are you stuck?
JemiM 5-Feb-13 9:00am
which label value you want to replace?selected item value?
Gittu Dash 5-Feb-13 11:50am
Well share your code what you have used so far.
Then can we try to help you.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Add onmouseover attribute to dropdown in code behind. This will plugin the client side onmouse over event. Once this is raised, you can do whatever you want in the related JavaScript method.

cscManoj22 5-Feb-13 23:58pm
above solution is not correct since it is happening only for dropdown not for dropdownlistitems

my req is when user select dropdownlist there will be a bunch of items populated

normally when we do mouseover on items the backcolor of the item changes to blue

hi i want to fill textbox value (not label-sry for mentioning label)

here is the code i am trying to do on mouseover

function ddnMouseOver(){
var StrPath="LookupXML.aspx?Caller=SubAccount;
var LookUpPath = ArrStrLocation[0] + "/" + ArrStrLocation[1] + "/" + ArrStrLocation[2] + "/" + ArrStrLocation[3] + "/" + StrPath;
SubAccountRequest = CreateRequest();
SubAccountRequest.onreadystatechange = ApplyOnsiteWarrantyHandler;'POST', LookUpPath, true);
req.onreadystatechange = function()

dom = req.responseXML;
if (!IsHasErrorTable(dom))
var dr=new TableReader(dom, "dtPCase");
Sandeep Mewara 6-Feb-13 0:14am
my req is when user select dropdownlist there will be a bunch of items populated
For this, in DataBound event of the dropdown, addthe same attribute to items.You have access to items in Databound event that occurs as many items you have.
cscManoj22 11-Feb-13 9:11am
hi can i have some sample code unable to achieve the above process
Sandeep Mewara 11-Feb-13 9:55am
Something like:
protected void lstMultipleValues_DataBound(object sender, EventArgs e)
foreach (ListItem item in lstMultipleValues.Items)
//check anything out here
if (item.Text.StartsWith("B"))
item.Attributes.Add("style", "color:red");
cscManoj22 12-Feb-13 10:48am
thnks for u r great support sandeep i am very much impressed with u r quickanswers

but the above solution doesn't work
Sandeep Mewara 12-Feb-13 11:59am
can you share what does not work and where did you find issue? did you debug?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171114.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100