Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript

Status
Not open for further replies.

bradshaw

Technical User
May 24, 2002
3
0
0
NZ
Is it possible to use javascript in VB6, if so how do I do it?
 
hi

this seems like a strange idea to me that you want to use Javascript in VB....cant you use VB?

Anyway the only way I can think that this could be done, and I havent tried it, is in the web class within VB. This way you can string your HTML together with any Javascript you need doing into your page at run time. You could hard code it in or you could have users type into a text box and then read the contents into your HTMl file. If you wanted to use the javascript functions though there is nearly always a VB equivalent. If you are just needing that ask for a secific functionality and you will get help here.

Hope this helps....Go with the web class (for which there is loads of tut's on the net) or just use VB equiv'

TATA
 
Yes, you can use JavaScript. You need to add a reference to the Microsoft Script Control. Generally this is used to run VBScript modules, but it actually supports any scripting language that thew Windows Scripting Host supports - and one of those is, of course, JavaScript. To set it up is a s easy as:
[tt]
Dim wsh As ScriptControl
Set wsh = New ScriptControl
wsh.Language = "Jscript" ' Choose your scripting language
[/tt]

After that you're on your own. I suggest you check out the script control documentation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top