CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: VBSCRIPT

  1. #1
    Join Date
    Nov 1999
    Posts
    6

    VBSCRIPT

    I am unsure if this is the correct forum. I am in a large environment where peope have Netscape 4 and IE 4/Outlook. I have written Help Documentation using the HHCTRL.OCX Active X Control. I have made it stand alone and web based. If some one is using Netscape to access the web documentation the Active X Control fails. I would like to have VBSCRIPT code that will automatically load I.E. 4 to a particular web page (not just open a window, actually run the program).

    I know how to do this from an Outlook Based form using VBSCRIPT.

    Below is the example:

    Sub Item_Open()
    Set MyApp = Item.Application
    Set Web = MyApp.CreateObject("InternetExplorer.Application")
    Web.Visible = TRUE
    Web.Navigate "www.yahoo.com"
    End Sub

    Does anybody know to use VBSCRIPT from a web page to achieve similar results?

    Thanks!

    Richard




  2. #2
    Join Date
    Nov 1999
    Posts
    6

    Re: VBSCRIPT

    Well, I answered my own question. Below is the VBSCRIPT code:

    html>

    <head>
    <title>Test</title>
    </head>

    <body>

    <p><input id="button1" name="button1" type="button" value="Button<<P"> <script
    LANGUAGE="VBScript">

    sub button1_onclick()
    ' Launch IE
    dim app
    set app = createobject("InternetExplorer.Application")

    ' Make it visible
    app.Visible = true
    app.navigate "www.yahoo.com"


    end sub
    </script> </p>
    </body>
    </html>


    The only problem is that this does not work in Netscape.... Does anybody know how to convert this to Java Script? I know this is getting beyond the scope of the forum.

    Richard S



  3. #3
    Join Date
    May 1999
    Posts
    3,332

    Re: VBSCRIPT

    var app = new ActiveXobject("internetexplorer.application);
    app.visible = true;
    app.navigate("yahoo.com");



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured