FIX: You receive incorrect results when you compare a NaN value to an integer value in VBScript in Internet Explorer 6 (901104)



The information in this article applies to:

  • Microsoft Internet Explorer 6.0, when used with:
    • Microsoft Windows Server 2003, Standard Edition
    • Microsoft Windows Server 2003, Web Edition
    • Microsoft Windows Server 2003, Enterprise Edition
    • Microsoft Windows Server 2003, Datacenter Edition
    • Microsoft Windows Server 2003, Enterprise x64 Edition
    • Microsoft Windows Server 2003, Datacenter x64 Edition
    • Microsoft Windows Server 2003, Standard x64 Edition
    • Microsoft Windows XP Service Pack 2, when used with:
      • Microsoft Windows XP Professional
      • Microsoft Windows XP Home Edition

SYMPTOMS

In Microsoft Internet Explorer 6, when you compare a not a number (NaN) value to an integer value in Microsoft Visual Basic Scripting Edition (VBScript), you receive incorrect results depending on the operating system that the computer is running. You receive the following results.
Operating systemResult
Microsoft Windows 2000 with any service pack installed or
Microsoft Windows XP with Service Pack 1 (SP1)
false
Microsoft Windows Server 2003 or
Microsoft Windows XP with Service Pack 2 (SP2)
true

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Windows XP service pack or Windows Server 2003 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Windows XP Service Pack 2
   Date         Time   Version     Size     File name
   -----------------------------------------------------
   30-Jun-2005  02:52  5.6.0.8828  417,792  Vbscript.dll
Windows Server 2003
   Date         Time   Version     Size     File name
   -----------------------------------------------------
   07-Jul-2005  21:37  5.6.0.8828  401,408  Vbscript.dll
Windows Server 2003 64-bit versions
   Date         Time   Version     Size     File name     Platform
   ----------------------------------------------------------------
   08-Jul-2005  00:19  5.6.0.8828  662,016  Vbscript.dll  x64

WORKAROUND

To work around this problem, use the IsNumeric function or the IsNaN function before you perform any comparisons.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Steps to reproduce the problem

  1. Create a new file by using Notepad, and then save the file as test.asp in the local Web folder.
  2. Paste the following code into the test.htm file.
    <HTML>
    <BODY onload="Test()">
    
    <SCRIPT LANGUAGE=vbscript>
    sub Test()
    dim num
    num = parseInt("A")
    alert (num = 2)
    end sub 
    </SCRIPT>
    
    </BODY>
    </HTML>
    
  3. Open the test.htm file by using Internet Explorer 6.

    Note The expected result is false. Instead, you receive the results that are mentioned in the "Symptoms" section.

Modification Type:MinorLast Reviewed:6/2/2006
Keywords:kbtshoot kbfix kbbug kbQFE kbHotfixServer KB901104 kbAudITPRO kbAudDeveloper