Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Browsers / Internet Explorer / August 2005



Tip: Looking for answers? Try searching our database.

option element

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mr dropdown - 19 Aug 2005 10:49 GMT
Let's say we have a select element with size=5, and contains 10 options (only
5 options can by seen concurrently).

Is it possible to tell by DHTML when an option in in sight and when it's not?

Thanks!
Mike Schurkin - 28 Aug 2005 18:11 GMT
I would assume that you want an event or notification sent off to your script
when an option item in an element comes into view.  However, since there is
no official onscroll event for a select object, that would make things much
more difficult to do.

What I would suggest is to use DHTML to create your own drop down list in
which you can design your own triggers for it.  Start with a hidden div that
pops open when you click on your object and scan for onscroll changes - do a
little math (based on the height of each text line - use a table with set
heights and absolute font characteristics and the scroll offset) and you
should be able to determine exactly what options are visible within the div
at any point in time - including partial text.

If you're using a mozilla based browser, you'll have to determine the height
of each table row dynamically since font sizes are overridden by the browser.

Hope this helps!

Mike,

> Let's say we have a select element with size=5, and contains 10 options (only
> 5 options can by seen concurrently).
>
> Is it possible to tell by DHTML when an option in in sight and when it's not?
>
> Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.