nivini
Programmer
- Mar 24, 2004
- 64
I have this code
the onmouseover trigers the OpenWin function, and the onmouseout , trigers the CloseWin function.
The problem is that it all works fine on my machine, but not on the web, there i get an error says that newPic is null or undefined,
What is the problem with this code?
many thanks
nivini
Code:
<script language="JavaScript">
<!--
var newPic = NULL;
var FSO;
function OpenPic(strPath){
var newPath=strPath;
var fullPath;
fullPath =newPath.replace("..","");
newPath="F:/web/webserver/[URL unfurl="true"]www/Pages"[/URL] + fullPath;
FSO = new ActiveXObject("Scripting.FileSystemObject");
if (FSO.FileExists(newPath)==true)
{
newPic=window.open(strPath,"NULL" ,"width=400, height=300, toolbar=no, resizable=no, menubar=no, top=0, left=0");
}
else
{
newPic=window.open("NoPic.htm","NULL" ,"width=400, height=300, toolbar=no, resizable=no, menubar=no, top=0, left=0");
};
};
function CloseWin(){
newPic.close();
};
-->
</script>
The problem is that it all works fine on my machine, but not on the web, there i get an error says that newPic is null or undefined,
What is the problem with this code?
many thanks
nivini