Results 1 to 4 of 4

Thread: Alt

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Angry Alt

    Hello,

    I dont know if this can be done (doubt it!!!).

    I want "Alt text" to be displayed when a item is selected in a dropdown / select box. The same as the "Alt" when using an image.

    eg.
    Code:
    <img src="images/accept.gif" width="96" height="17" ALT="Some alternate text displayed here!!">
    Can this be done with a select / dropdown??

    Code:
    <select name="test" size="1">
      <option value="one item" alt="Display alt text here!!">one item</option>
    </select>
    Thanks,
    T

  2. #2
    Addicted Member csammis's Avatar
    Join Date
    Mar 2001
    Location
    /dev/null
    Posts
    226
    Well, have you tried the example you gave? Other than that, perhaps the "onMouseOver" javascript tag will work, in which case you can alter the statusbar text to give tooltips
    Things I've Said:
    "Life's funny like that...elephants can wear frilly lace panties, and Dubya still looks like a monkey in a big chair"
    "Take four goats and strap one to each foot of a llama. Presto, goat-powered llama!"
    "You want to get me to work more, get me a Coke. No? Then deal with inferior garbage, I'm not coding another line and your clients can go to......thanks, I'd love a Coke right about now!"

  3. #3
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    You could fairly easily write a javascript tooltips function that is called onmouseover and reads the value of the select and displays a hidden DIV/Layer tag block with the alt text.

    Just an idea.. but no there is no built in way. ALT is not an attribute for the SELECT tag or OPTION tags.

    You can store the alt text in the LABEL attribute but this attribute does nothing unless you implement something that uses it.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    There is a title attribute that was added to HTML, but IE5.5 doesn't show it on option or select tags.
    Code:
    <p title="test">fgdfgdfgdfg</p>
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width