.focus in VBScript different in IE5

Results 1 to 1 of 1

Thread: .focus in VBScript different in IE5

  1. #1
    Join Date
    Dec 1969

    Default .focus in VBScript different in IE5

    I have a piece of client side vbscript code that works fine in IE4 but in IE5 it processes the function but then goes ahead and processes the key that had been pressed (tab, enter, etc...) In IE4 it returns to the field that I set the focus on. Here???s the code:<script language=???VBSCRIPT???> Function GoodDate(datefield) If datefield.value <> ?????? Then If Not IsDate(datefield.value) Then i = MsgBox(???Please enter a valid date???,48,???Microsoft Internet Explorer???) datefield.value = ?????? datefield.focus Else datefield.value = CDate(datefield.value) End If End If End Function</script>...<INPUT id=StartDate name=StartDate ONCHANGE=???GoodDate (StartDate)??? maxlength_ size_>Suggestions?Thanks!
    Last edited by Jay; 04-16-2011 at 01:11 AM.

Posting Permissions

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