Microsoft KB Archive/321086

= Jscript Cannot Compare .location Values in Pocket Internet Explorer =

Article ID: 321086

Article Last Modified on 7/27/2004

-

APPLIES TO


 * Microsoft Pocket PC 2002 Software Standard Edition

-



This article was previously published under Q321086



SYMPTOMS
Jscript in Microsoft Pocket Internet Explorer for Pocket PC 2002 evaluates the following boolean expression differently than it does on Pocket PC: top.location != location On Pocket PC this evaluates to true only if the top window location URL is not the same as the current window location URL. On Pocket PC 2002, this always evaluates to true regardless of the location URL values. Based on the overall design of the Jscript, there may be various symptoms.

Example
The following example causes Pocket Internet Explorer for Pocket PC 2002 to endlessly reload the Web page that contains this script: if (top.location != location) top.location.href = location.href;



RESOLUTION
To work around this problem, implement the script by using the following expression: top.location.href != location.href



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
The &quot;top.location != location&quot; expression is not frequently used.

