mask to input data

Results 1 to 3 of 3

Thread: mask to input data

  1. #1
    Join Date
    Dec 1969
    Posts
    572

    Default mask to input data

    How can i put mask to input data or time as like __/__/__ or __:__/ ?<BR>Thanks...

  2. #2
    Join Date
    Dec 1969
    Posts
    736

    Default RE: mask to input data

    That seems to me like it would be best handled in the browser with VBScript or better, JavaScript.<BR><BR>Ian

  3. #3
    Ed Guest

    Default RE: mask to input data

    To my knowledge the best you can do is something like this:<BR><BR>&#060;form name=frmDate id=frmDate&#062;<BR>&#060;input type=textbox name=frmDate id=txtDate value=" / / "&#062;<BR>&#060;/form&#062;<BR>&#060;script language=vbs&#062;<BR>sub txtDate_onclick<BR> document.frmDate.txtDate.value = ""<BR>end sub<BR><BR>sub txtDate_onchange<BR> if Len(document.frmDate.txtDate.value) &#060;&#062; 8 then<BR> msgbox "Please enter your date in mm/dd/yy format."<BR> elseif Right(Left(document.frmDate.txtDate.value, 3), 1) &#060;&#062; "/" then<BR> msgbox "Please enter your date in mm/dd/yy format."<BR> elseif Left(Right(document.frmDate.txtDate.value, 3), 1) &#060;&#062; "/" then<BR> msgbox "Please enter your date in mm/dd/yy format."<BR> elseif not IsDate(document.frmDate.txtDate.value) then<BR> msgbox "Please enter your date in mm/dd/yy format."<BR> else<BR> msgbox "Good job."<BR> end if<BR>end sub<BR>&#060;/script&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •