Frank Carr wrote:
"Craig" <my****@myaccount.com> wrote in message
news:3f***********************@lovejoy.zen.co.uk.. .
I have a page that has a few columns and totals.
I've been asked to amke sure that not only is the totals boxes readonly,
they must not accept focus from the cursor.
..........
Is there a way to make sure the user can't tab to a totals edit box ?
My recommendation would be not to use an edit box to display the totals. If
it is a edit box it gives a 'visual affordance' of being clickable,
tab-able, and editable. Use a different method to display the total so that
the user can easily tell that it isn't for interaction.
Why not something like:
<form>
<input type="text" name="one" size="5"
onblur="this.form.result.value = +this.value + +this.form.two.value;" />
<input type="text" name="two" size="5"
onblur="this.form.result.value = +this.value + +this.form.one.value;" />
=
<input type="text" name="result" size="5" readonly onfocus="this.blur();"
style="border:none;border-bottom:1px solid Black;text-align:right;" />
</form>
Works in every browser from Netscape 4 (and possibly 3) to the most modern
browsers available. Certainly it creates some false input cues on some
browsers, but it provides the same functionality on almost every browser
without any modification what-so-ever.
--
| Grant Wagner <gw*****@agricoreunited.com>
* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
*
http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
*
http://www.mozilla.org/docs/web-deve...upgrade_2.html