PDA

View Full Version : Show Hint script disabling tabstop



grahamfecitt
01-03-2008, 04:29 PM
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

jscheuer1
01-03-2008, 05:17 PM
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):


<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):


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

grahamfecitt
01-04-2008, 01:03 PM
Thanks John! - that has solved my problem - much appreciated
Graham