Date:  11/16/2001 01:14:04 AM Msg ID:  000131
From:  Oleg Goncharuk Thread:  000122
Subject:  Re: More HTML questions
All below is possible in MSIE 5.0 and higher versions of Microsoft browser (part of it works even in Mozilla and Opera)

1) Use behaviors (only Microsoft) example:
<input type="text" value="" style="behavior:url(date.htc)">

Source for date.htc:
<PUBLIC:COMPONENT lightWeight="true">

<PUBLIC:ATTACH EVENT="onblur" ONEVENT="checkN()"/>
<PUBLIC:ATTACH EVENT="onfocus" ONEVENT="doFocus()"/>
</PUBLIC:COMPONENT>

<SCRIPT LANGUAGE="JScript">
function doFocus(){
   element.select()
}
function checkN(){
if (element.value.length==0) return;
r=/^\d{2,4}[.\/](?:[1][0-2]|[0]?[0-9])[.\/]([0-2]?[0-9]|[3][01])\s*$/
if (!r.test(element.value)){
alert("Date format is YYYY.MM.DD")
element.value=element.defaultValue;
element.focus();
cancelBubble=true;
return false;
}
return true;
}
</SCRIPT>

2) Try to use onkeydown event (see http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onkeydown.asp )
3) Yes
<div style="position:absolute;left:20;right:20:width:3;height:100;border-left:solid 2 black;"></div>
4) Yes
<table style="border:solid 2 black;">
<tr><td>Cell 1</td><td>Cell 2</td></tr>
</table>

Sent by Alan Harris-Reid on 11/15/2001 01:35:10 PM:
A few HTML questions...

1. Is there any way I can control the input mask of a textbox so that the value is in dd/mm/yy format?  As far as I can see it is treated as a character string and the user can enter anything.  It's a pain to have to validate every date field when the form is posted before it can be processed as a date value.

2. Is there any way of ensuring that pressing the enter key moves the focus from one textbox to another (ie. behaves as the tab key)?

3. Is there any way of drawing a vertical line in HTML?

4. I would like to show an outer border for a table, but no borders between cells in the tabel.  Is this possible?

TIA
Alan Harris-Reid