<script>
function select(image)
{
var str1;
//.....
str1 = newURL;
var fso = ActiveXObject("Scripting.FileSystemObject");
var abcd = fso.CreateTextFile("C:\\Desktop\\testfile.txt", true);
abcd.WriteLine(str1);
abcd.close();
}
</script>
<img id= "img1" src="abc.png" alt="" onclick="select(this)" />
i am writing this script code in my view.cshtml page. I dont know whats wrong with this code. i want this function to be execute when i select an image. is there any Assembly refernce to be added here or something? if there is browser compatibilty issue ? I have also istalled ActiveX plugin for chrome but its still not working ? so can any one suggest a better solution for this please? ?