Results 1 to 3 of 3

Thread: Show Hint script disabling tabstop

  1. #1
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Show Hint script disabling tabstop

    1) Script Title: Show Hint script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex16/showhint.htm

    3) Describe problem: This is a great script, but my users have complained that they cannot easily follow through my form using the tab key because the focus stops on the hint links, and requires them to double-tab.
    Disabling the hint link cures this, but then displays in it gray.
    Is there any way to disable the link but still display it in a sensible colour?
    (I am relatively new to this)

    Thanks

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The problem exists because the hint is a link (an anchor link a tag with href attribute). It doesn't need to be, would be better in general if it was not. I'd choose span (from the demo, changes red):

    Code:
    <form>
    <b>Username:</b> <input type="text" class="test" /> <span class="hintanchor" onMouseover="showhint('Please choose a username. Should consist of alphanumeric characters only.', this, event, '150px')">[?]</span><br />
    <b>Password:</b> *<input type="text" class="test" /> <span class="hintanchor" onMouseover="showhint('Enter the desired password. <b>Must</b> be 8 characters or longer.', this, event, '200px')">[?]</span><br />
    </form>
    If you want the [?] to still look the same, add to the style (red again):

    Code:
    .hintanchor{ /*CSS for link that shows hint onmouseover*/
    font-weight: bold;
    color: navy;
    margin: 3px 8px;
    cursor:pointer;
    text-decoration:underline;
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks John! - that has solved my problem - much appreciated
    Graham

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
  •