Automation error when calling ExecScript
Hi All,
Can anybody help me??
I am calling a Javascript code from within VB application, with the help of ExecScript method. The problem is that, if I am using only some alert() statements in the javascript's code, then it runs fine. But as soon as I use window.event.clientX or window.images[0].style or some javascript objects in Javascript code, there is a run time error : Automation Error (-2147417843).
I dont know what mistake I am doing. I am doing web programming first time through VB. When I test this Javascript code in an HTML file, then it is running fine. But when I call this JS code from within VB, then there is this error.
Please help me in solving this problem.
Thanks in advance.
Re: Automation error when calling ExecScript
What version of VB are you using?
Post the code that is causing the error.
1 Attachment(s)
Re: Automation error when calling ExecScript
Hi,
I am using VB 6.0 Enterprise Edition. You can find the code in zip file. In this code, I am using text file "One.Txt" which contains an alert() statement. In this case code runs fine. But if I use anoter text file "Two.Txt" which contains a window.event.clientX statement, then Automation error generates. Right now, I have commented out that statement which is generating error.
The working of program is : run the program, and then start Internet Explorer, Open any web page. As soon as your mouse pointer is hovering over the web page, the javascript code is executed.
Thanks & Regards