I’m having a problem with a Javascript function
hard coded it works (some Ip is my company’s ip address)
var net = new ActiveXObject(“wscript.network”);
net.MapNetworkDrive(“K:”, “
But, what I’m doing is getting the values for the drive and path from a web form, when I do that, I get a errors, no matter what I do. I get either “Wrong number of arguments” error or “wrong number of arguments or invalid property assignment”
this is an example of how I get the values, when I put them in an alert, their coming across just fine.
var drive = cell[1].innerHTML + ‘:’;
var path = cell[3].innerHTML;
now the var drive and path have what I need, but no matter how I pass them to the function, it does not work. I’ve tried:
net.MapNetworkDrive(drive,path);
net.MapNetworkDrive(drive + ‘, ‘ + path);
var str = ‘”‘ + drive + ‘”‘ + ” , ” + ‘”‘ + path + ‘”‘;
net.MapNetworkDrive(str);
These don’t works, but hard coding does work.
Can someone help me here?
Taffy