SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Oct 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    tooltip in INPUT element

    We are doing web programming in school. I am supposed to write something that will do a tooltip when you either enter an input box or roll over an input box. It is not supposed to be a javascript alert, but a tooltip. This is what I currently have:

    <td><input type="input" id="fName" name="fName" OnKeypress="return isNumberKey(event)" size="5" maxlength="20" /></td>

    We haven't learned JavaScript, I couldn't find anything online, and it's due tomorrow. I found some javascript that will check to make sure that a number isn't being entered into the input box. Does anyone have a script that does a tooltip? Any help would be greatly appreciated. Thanks in advance!

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,275
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    try using a TITLE attribute for the INPUT tag

    by the way, this isn't a CF question so i'll move it to the HTML forum
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Member
    Join Date
    Oct 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, that's what I thought, but that isn't what they are looking for. They are looking for an actual tooltip.

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,275
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    okay, in your own words, what is an "actual" tooltip?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A title attribute will only work for mouse hover anyway, not for keyboard focus.

    You could do this with some CSS trickery and an extra HTML element or two, but I don't think you can get it to work in IE6 without JavaScript.
    Birnam wood is come to Dunsinane

  6. #6
    SitePoint Member
    Join Date
    Oct 2008
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have found that there is a CF tag called <cftooltip> that can be used to handle such a request. Thanks for the input fellas.


Bookmarks

Posting Permissions

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