Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4081646
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:05:15+00:00 2026-05-20T18:05:15+00:00

I have an asp:listbox which I populate from a database. I am however trying

  • 0

I have an asp:listbox which I populate from a database. I am however trying to retrieve the option id when I hover over it with the mouse. What I would normally do is attach a mouseover event but apparently in IE options don’t recognize mouseover events! So is there a way I can get which option I am currently over?

<select size="4" name="lstbox_AdvCat" id="lstbox_AdvCat" style="height:500px; width:285px;">
<option value="0" Title="">None</option>
<option value="1" Title="Accessories
Clothing
Footwear
Jewelry
Watches">Apparel, Footwear, Accessories</option>

All I really need to do is retrieve something so I can say ‘im over the x’ element so I can display some other information in a panel.

Is there a sensible way to do this?

I have the listbox wrapped in a div and have attached an event

function lstbox_AdvCatOver(mEvent) {
    //internet explorer
    if (mEvent.srcElement) {
        alert(mEvent.srcElement.nodeName);
    }
    //the others
    else if (mEvent.target) {
        alert(mEvent.target.nodeName);
    }
}

I was interested to see what I would get but I don’t know how to extend this to make it useful – any help.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:05:15+00:00Added an answer on May 20, 2026 at 6:05 pm

    Just using native JS it could look something like this:

    http://jsfiddle.net/5QMdv/1/

    HTML:

    <select size="4" name="lstbox_AdvCat" id="foo" style="height:500px; width:285px;">
        <option value="0" Title="">None</option>
        <option value="1" Title="Accessories
        Clothing
        Footwear
        Jewelry
        Watches">Apparel, Footwear, Accessories</option>
    </select>
    

    JS:

    function lstbox_AdvCatOver(mEvent) {
        alert("nodeName: [" + this.nodeName + "] - value: [" + this.value + "]");
    }
    
    var options = document.getElementById("foo").options;
    
    for (var i = 0; i < options.length; i++) {    
        var option = options[i];
        option.onmouseover = lstbox_AdvCatOver;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListBox containing a large number of items, which are all account
I have a page that has several ListBox es that have some cascading filtering
I have a problem scenario like this:- 1) Listbox with values like Car, Scooter
I have two list controls in my asp.net page and am populating the second
is there an easy way to scroll an ASP.Net ListBox automatically to the first
I have a GridView and I want to add some more parameters to the
I am building a multiuser WPF application (requirement is a desktop app), database SQL
I have an html list box and want to double click an item in
This should be the simplest thing ever but it will not work. I have
I am having a lot of trouble with a seemingly simple thing. In an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.