-
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.
-
Why Not Use MS Visual Interdev ??
-
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
-
-
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
-
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
-
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
-
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.
-
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