Article ID: 185372
Article Last Modified on 5/11/2006
<A HREF="javascript:openWindow()" TARGET=_self>
<A HREF="javascript:openWindow()">Open a New Window</A>
<SCRIPT LANGUAGE="JavaScript">
<!--
function openWindow()
{
window.open("<WWLINK TYPE="GENERIC" VALUE="http://www.microsoft.com");">http://www.microsoft.com");</WWLINK>
}
//-->
</SCRIPT>
When developing for the Active Desktop, never make any assumptions about
the context that you are in. For example in this case, the openWindow() function is in the context of the current document. For this to work from the Active Desktop, add an explicit _self reference, like the following:
<A HREF="javascript:openWindow()" TARGET=_self>Open a New Window</A>
<SCRIPT LANGUAGE="JavaScript">
<!--
function openWindow()
{
window.open("<WWLINK TYPE="GENERIC" VALUE="http://www.microsoft.com");">http://www.microsoft.com");</WWLINK>
}
//-->
</SCRIPT>
Additional query words: HREF javascript
Keywords: kbfix kbprb kbfaq KB185372