473,534 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Show complete select box entry

Hi,

I use a select box with a fix width (via stylesheet).
So some of the entries are cut on the right side if they're too long.
Is there a way to display them complete like a tool tip on a mouseover?

Thanks,
Jens

Jul 20 '05 #1
4 9206
Jens Riedel wrote:
Hi,

I use a select box with a fix width (via stylesheet).
So some of the entries are cut on the right side if they're too long.
Is there a way to display them complete like a tool tip on a mouseover?

Thanks,
Jens


<select ... onmouseover="this.title =
this.options[this.selectedIndex].text;">

Works in Netscape 7, Mozilla and other Gecko-based browsers and Opera 7.
It'd work in IE too if IE displayed the TITLE on <select> in a tooltip.

I even tried the following in IE:

<span id="testWrapper"><select ... onmouseover="this.parentNode.title =
this.options[this.selectedIndex].text;">
<!-- options -->
</select></span>

No joy. Probably caused by the fact that a <select> is a windows object
that doesn't play well with other HTML elements <url:
http://support.microsoft.com/default...b;en-us;177378 />

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #2
Ivo
> <select ... onmouseover="this.title =
this.options[this.selectedIndex].text;">
I even tried the following in IE:
<span id="testWrapper"><select ... onmouseover="this.parentNode.title =
this.options[this.selectedIndex].text;">
<!-- options -->
</select></span>

A workaround that I appear to be progressing with although I can not
post example code atm, is to subtract the Yposition of the select list
from the mouse Yposition, compare that to the selectedIndex to find
which of the dropped down options is currently highlighted, then
display a absolutely floating div NEXT to the select. You need to know
the font height etc.etc.
HTH
Ivo
Jul 20 '05 #3
Hi Grant,

Grant Wagner wrote:

[..]
No joy. Probably caused by the fact that a <select> is a windows object
that doesn't play well with other HTML elements <url:
http://support.microsoft.com/default...b;en-us;177378 />


Thanks for your hints, it works fine with Mozilla.

Unfortunately IE is just the browser our customers use in 95% of all
cases, so perhaps I have to try the workaround Ivo describes.

Regards,
Jens

Jul 20 '05 #4
Ivo wrote:
A workaround that I appear to be progressing with although I can not
post example code atm, is to subtract the Yposition of the select list
from the mouse Yposition, compare that to the selectedIndex to find
which of the dropped down options is currently highlighted, then
display a absolutely floating div NEXT to the select. You need to know
the font height etc.etc.
HTH
Ivo


Hi Ivo,

thanks for this hint. If our customers can't be made to abstain from the
tooltip, I'll try this...

Regards,
Jens

Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
14603
by: Newbie | last post by:
Dear friends, I am having a hard time understanding how to use a SELECT CASE in ASP. I have used it in VB but never in ASP scripting. Scenerio: I have 2 textboxes on a form that I have to allow entry to one or the other or Both at the same time. Now I tried to use an If ElseIf but it got too hard to track, so now I am using a...
4
20825
by: Joe | last post by:
I created a CustomAction for this but I don't think I have it in the right place. I tried both Install and Commit but neither allow it to get to the final screen. Are there any examples of this anywhere? Thanks, Joe
2
40041
by: Marcel Hug | last post by:
Hi NG! With a Inner-Join SQL I get my datas in a DataSet. In the table are the column Entry and Version. Like this: Entry Version 1 1 1 2 1 3
1
3458
by: Aaron West | last post by:
Try this script to see what queries are taking over a second. To get some real output, you need a long-running query. Here's one (estimated to take over an hour): PRINT GETDATE() select count_big(*) from sys.objects s1, sys.objects s2, sys.objects s3, sys.objects s4, sys.objects s5 PRINT GETDATE()
1
4146
by: No bother | last post by:
When I execute the command "show create view" while logged in as root I get this error: "select command denied to user 'root'@'%' for column (a table that from which the view draws part of its data)" I can select the data from the column using the standard select syntax. I can also get the data from the view itself by running it using the...
130
6394
by: Daniel Manes | last post by:
I'm baffled. I have a column in a SQL Server Express database called "Longitude," which is a float. When I view the table in a DataGridView, some of the numbers, which only have two decimal places in the database show up with *15* decimal places and are ever so slightly off (in the example in the subject line, by about 2E-15). I'm not doing...
1
5313
by: Jenny | last post by:
Dear all, I have one select which lists one visible element. I want this select can show scrollbar after I click its down arrow, so that i can use the scrollbar to select the element i want. I test it on windows IE. The scrollbar will be shown when the select has more than 30 elements, otherwise it won't show scrollbar. I don't want the...
2
3883
by: banderson | last post by:
Hello, I have a data entry form for a table with information about buildings and am having a problem making a combo box do what I want. I would like to make the combo box show a list of unique bldg mgmt company names and then to open a building management company form to show all records with this name, so the user can find the correct branch...
1
1457
by: glasssd | last post by:
Hi, I was hoping someone might have some ideas on how I can hack around a problem I'm having with the auto-complete feature of the ComboBox. I have a data entry application that uses a pair of ComboBoxes on the main entry screen. These are configured to use the Suggest Append auto-complete feature with the List Items as the data source. ...
0
7288
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7529
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7272
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5210
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4840
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3341
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
913
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
570
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.