When I try to run the below code, I get some error.
File name is test.html
The error message is :Code:<HTML> <HEAD> <META name=VI60_defaultClientScript content=VBScript> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <TITLE></TITLE> </HEAD> <BODY> <P><INPUT id=button1 name=button1 type=button value=Button></P> <SCRIPT LANGUAGE=vbscript> <!-- sub Button1_OnClick Dim fso, MyFile, RdData Set fso = CreateObject("Scripting.FileSystemObject") Set MyFile = fso.OpenTextFile ("MyData.txt",ForReading ) RdData = MyFile.Readall Msgbox RdData MyFile.Close end sub --> </SCRIPT> </BODY> </HTML>
An exxeption of typee "Microsoft VBScript runtime error: ActiveX component can't create object: "Scripting.FileSystemObject" was not handle.




Reply With Quote