Link to home
Create AccountLog in
HTML

HTML

--

Questions

--

Followers

Top Experts

Avatar of boughtonp
boughtonp

alt/title attribute for OPTION tag?
Right, basically I have a drop-down SELECT menu.
Some of the entries are very long, so I wrote some ColdFusion to cut off the end of any long entries.
However, I was wondering if it was possible to have the full entry appear as a hover like with the title attribute.

It's not vitally important, but it would be nice...

If it's relevant, here is my current code:
          <select name="i_id">
            <cfset MaxCharacters = 50/>
            <cfoutput query="GetItems">
              <option value="#i_id#" title="#i_name# #i_desc#">
                <cfif i_name & " " & i_desc EQ Left(i_name & " " & i_desc,MaxCharacters)>
                  #i_name# #i_desc#
                <cfelse>
                  #Left(i_name & " " & i_desc,MaxCharacters)# ...
                </cfif>
              </option>
            </cfoutput>
          </select><br/>

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


ASKER CERTIFIED SOLUTION
Avatar of lexxwernlexxwern🇳🇱

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of lexxwernlexxwern🇳🇱

*THE ABOVE CODE IS IE5+ SPECIFIC*

Avatar of boughtonpboughtonp

ASKER

It's also very long. :/
Bearing in mind this is being generated from a database with close to 200 entries in - I could have that code outputted in loops, but it would have a long execution time I suspect.

IE-specific isn't a problem as this will be part of an admin section, which will only have one/two user(s) and they will have IE 5 or 6.

Avatar of lexxwernlexxwern🇳🇱

Yes its really not preferred to be used, but it never-the-less is what you asked in the question.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


True. I'll give it a day and if no-one else has suggested anything better I'll let you have the points...

Okay, so when I said a day I actually meant 19 days. ;)
HTML

HTML

--

Questions

--

Followers

Top Experts

HTML (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser, providing both the structure and content for what is sent from a web server through the use of tags. The current implementation of the HTML specification is HTML5.