[thelist] Fomated tet box question

Jay Blanchard jay.blanchard at niicommunications.com
Wed Mar 9 08:31:20 CST 2005


[snip]
That is rather sexy, but it took me a while to see that I enter stuff
there, I thought the script bugged.

Furthermore it changes the normal user expectation: you enter a field
and
hit tab to reach the next one. When I enter something here and tab I
skip
one field.
[/snip]

True, but I think that it fit's the OP's requirements pretty well. As
far as seeing it you could put a border around the whole thing, here is
an example...

<script language="javascript">
function changeCursor(from,to,len) {
	if(from.value.length>=len) {
		to.focus();
	}
	return true;
}
</script>
<form name="FORMNAME" action="" method="POST">
<span style="border: thin inset;">
<input style="border: none;"  type="text" name="myDay" size="2"
maxlength="2" value=""
onkeyup="changeCursor(document.FORMNAME.myDay,document.FORMNAME.myMonth,
2)">/
<input style="border: none;" type="text" name="myMonth" size="2"
maxlength="2" value=""
onkeyup="changeCursor(document.FORMNAME.myMonth,document.FORMNAME.myYear
,2)">/
<input style="border: none;" type="text" name="myYear" size="4"
maxlength="4" value=""><br />
</span>
</form>

Now it looks like one input box with static slashes....


More information about the thelist mailing list