Results 1 to 9 of 9

Thread: Help with Exposing VBScript Objects

  1. #1

    Thread Starter
    Hyperactive Member SoftwareMaker's Avatar
    Join Date
    Mar 2001
    Location
    Elbonia with Dilbert and Wally
    Posts
    322
    Hi all,

    I want to write some VBscripts in a HTML page BUT I am sometimes lost as to the objects and the properties and the methods available to me.

    For example the Document Obect or the Window Object
    Document.Write
    Window.Navigate

    There is no way I can expose the properties available to me in FrontPage 2000 (or is there ???)

    Can I do so in the IDE of VB6 where I can see the properties and methods available via the friendly Drop-Down menu Box ?

    If I can do in the VB6 IDE, what object library must I set reference to ? I have tried the HTML, VBScript Object Library but none of them seem to work.

    Any help is appreciated.
    William T
    Software Architect / Chief Software Developer
    Softwaremaker.Net Pte Ltd
    http://www.Softwaremaker.net

    *** Things are always the darkest before they go pitch black ***

  2. #2
    Addicted Member Active's Avatar
    Join Date
    Jan 2001
    Location
    Lat: 13° 4' 46" N, Long: 80° 15' 20" E
    Posts
    209
    Why Not Use MS Visual Interdev ??
    If you can't beat your computer at chess, try kickboxing !!!
    [Download Tag Editing Tools.]

  3. #3

    Thread Starter
    Hyperactive Member SoftwareMaker's Avatar
    Join Date
    Mar 2001
    Location
    Elbonia with Dilbert and Wally
    Posts
    322
    Thanks for the reply, Active

    I do not want to use MS InterDev because of limited HardDisk Constraints...Anyway I dont think I have it

    So is there a way to do it in VB6 itself ???

    Thanks
    William T
    Software Architect / Chief Software Developer
    Softwaremaker.Net Pte Ltd
    http://www.Softwaremaker.net

    *** Things are always the darkest before they go pitch black ***

  4. #4
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300
    Try this link

  5. #5

    Thread Starter
    Hyperactive Member SoftwareMaker's Avatar
    Join Date
    Mar 2001
    Location
    Elbonia with Dilbert and Wally
    Posts
    322
    Thanks for the reply, Mr Bloodeye

    What you have given me are properties of the Document Model. I have an MSDN Subscription and I can refer to it.

    BUT what I wanted is to have the Drop-Down Box in VB IDE to expose all available properties and methods so that I dont always have to refer to the MSDN all the time.

    Is there a way to do it in VB IDE ?

    Eg. Exposing the Document or Window Properties is just like Exposing the properties of the ListBox Control in VB6

    Somebody please help. Thanks
    William T
    Software Architect / Chief Software Developer
    Softwaremaker.Net Pte Ltd
    http://www.Softwaremaker.net

    *** Things are always the darkest before they go pitch black ***

  6. #6
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300
    This is off the top of my head so it might not work.

    1) Make a reference to the HTML Object Library (MSHTML.tlb)
    2) Type Private WithEvents htmlDoc As HTMLDocument in the Declarations.
    3) Try typing htmlDoc. and see what happens

  7. #7

    Thread Starter
    Hyperactive Member SoftwareMaker's Avatar
    Join Date
    Mar 2001
    Location
    Elbonia with Dilbert and Wally
    Posts
    322
    Bloodeye (nice name, nice logo)

    Say, I did what you said...Wouldnt that script read htmlDoc.properties ?

    Now, if I do that, would I have problems copying the same entire script over to an HTML page ???

    I dont think a normal VBScript recognises htmlDoc as a standard HTML Object

    I just want to do some VBscripts in VB itself then copy over the scripts to a Webpage.

    Thanks Bloodeye
    William T
    Software Architect / Chief Software Developer
    Softwaremaker.Net Pte Ltd
    http://www.Softwaremaker.net

    *** Things are always the darkest before they go pitch black ***

  8. #8
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300
    Try (htmlDoc.Document.) and see what kind of properties, methods, etc...pop up. There should be some there, but I'm not sure if this will expose all the properties, methods, etc that you can use in a document.

  9. #9

    Thread Starter
    Hyperactive Member SoftwareMaker's Avatar
    Join Date
    Mar 2001
    Location
    Elbonia with Dilbert and Wally
    Posts
    322
    Hi Bloodeye,

    I tried out what you said...But I changed some things around so that I can copy the script back to a webpage

    I set the reference to the MS HTML Object
    Private Document as HTMLDocument

    Then, when I type Document.
    All properties appear relating to the Document Object Model

    Then I type Document.Write or Document.WriteIn

    When Finished, I just copy the script to a webpage. Because I used the Document as a Variable name, I managed to fool the Webpage into thinking it is a real Document Object.

    Thanks so much for your help, Bloodeye. I really appreciate it. Thanks
    William T
    Software Architect / Chief Software Developer
    Softwaremaker.Net Pte Ltd
    http://www.Softwaremaker.net

    *** Things are always the darkest before they go pitch black ***

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