Trying to open a file on a network drive when user clicks an HTML button on a web page. When page loads, there is an error that states there's an invalid character on the line where I declare my variable. When I click the button, the error changes to "Object expected" but is on a line nowhere near any scripting or any HTML code related to scripting. Does my code look correct or no?
And, yes my button is calling the function on the "onclick" and "filepath" from VB code does have a value when I do a view source on the page.
var x = new ActiveXObject("WScript.Shell");
OK, I found out the reason for the invalid character error on the page load. It doesn't like the "filepath" from the VB side. I replaced with a text string to my local hard drive and the error goes away.
When I click the button now, the error is: "The system cannot find the file specified" even though the file exists.
Yes, same result. The one big question, though, is will this work when trying to get a file from a network drive? If not, I might as well stop while I am ahead if I can only get it to work from a local hard drive.
Spoke with my supervisor. After I told him the problem, he suggested a different route. I am going to try it and see if I can get it to work. Thanks for your help. I'll reply later on if I come up with a solution.