Executing VBScript in a HTML page using web browser control 
Author Message
 Executing VBScript in a HTML page using web browser control

Hi,

I have a web browser control in which i have loaded a html page.

The html page contains 2 scripts( a javascript and a VBScript).

I used webbrowser1.document property to access the web page properties.
Iam able to get the number of scripts but iam not able to execute one of
them.

Is there anyway I can execute these scripts from VB(say button click
event)

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Fri, 31 Dec 2004 22:10:48 GMT  
 Executing VBScript in a HTML page using web browser control
Hi,

Try this:

strScript = WebBrowser1.Document.scripts.Item(2).innerHTML
WebBrowser1.Document.parentWindow.execScript (strScript)

I hope this helps!

Regards,
Yan Liu
This posting is provided "AS IS" with no warranties, and confers no rights.



Sun, 02 Jan 2005 08:43:10 GMT  
 Executing VBScript in a HTML page using web browser control
Hi,

Try this:

strScript = WebBrowser1.Document.scripts.Item(2).innerHTML
WebBrowser1.Document.parentWindow.execScript (strScript)

I hope this helps!

Regards,
Yan Liu
This posting is provided "AS IS" with no warranties, and confers no rights.



Sun, 02 Jan 2005 08:43:10 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Saving HTML page back to disk (web browser control)

2. How to view the HTML Source using VB 4 and the Web Browser Control

3. simulating Submit from an HTML form using Web Browser control in Visual Basic

4. Printing a Web Page in Web Browser Control

5. view HTML page source in browser - vbscript method?

6. Web Browser Control in HTML Layout Control

7. Using VB Script to execute an EXE file from a Web Browser

8. Web Browser Control - HTML Source

9. How to read html source from Web-browser control

10. web browser goback/goforwd commands do not used cache pages

11. Call VB routine from HTML in web Browser control

12. Web Browser Control and local HTML files

 

 
Powered by phpBB® Forum Software