input type=text OVERTYPE

liunx

Guest
Is there a way to have focus go to a text field and automatically be in overtype mode without actually selecting the entire contents of the textfield?<!--content-->Try something like this:<br />
<br />
<br />
<html><br />
<head><br />
<script language="javascript"><br />
<!--<br />
var flag = true;<br />
function overtype(thisElement){<br />
if (flag) {<br />
thisElement.value = "";<br />
flag = false; // avoid deleting input after initial click<br />
}<br />
}<br />
//--><br />
</script><br />
</head><br />
<body onload="document.myform.myelm.focus()"><br />
<form name="myform"><br />
Type here: <input type="text" size=80 value="Enter text" name="myelm" onkeydown="overtype(this)"><br />
</form><br />
</body><br />
</html><!--content-->I am guessing that means there is no built in overtype feature for a regular html text field. <br />
<br />
This is a problem because I have a text field which will hold a date. The field is already masked to insert the '/' marks where needed, but I wanted the user to be able to overtype in this field if there is something there....I don't want to delete everything that is there, just allow them to overtype one character at a time.....<br />
<br />
I may have to rewrite the method used to mask the field in order to allow this, thanks for your reply<!--content-->
 
Back
Top