embedding VBScript in outgoing HTML (General questions)
by John Baker, Wednesday, December 01, 2004, 02:29 (7296 days ago)
How do I embed VBScript?
The following code doesn't work, but it is what I would like to do (in Sub Http1_RequestDone, I think):
resp = resp & <SCRIPT LANGUAGE= VBScript > MsgBox Hello World </SCRIPT>
tia
John Baker
Re: embedding VBScript in outgoing HTML
by wodSupport, Wednesday, December 01, 2004, 02:31 (7296 days ago) @ John Baker
John,
it doesn't work - in what way? Is this what client receives when page is downloaded, and when you select 'view page source' there?
Re: embedding VBScript in outgoing HTML
by John Baker, Wednesday, December 01, 2004, 05:43 (7296 days ago) @ wodSupport
Wow - that was a fast response! Thanks.
I might be asking a dumb question. I am an experienced VB programmer but I'm only just starting with HTML.
At the moment I'm trying to get familiar with using VBScript. I thought I would modify your sample code 2. Simple - manual response.
What I tried to do was use VBScript to add a MessageBox that would pop up as the browser started to display the HTML manually created in your sample. I can do this using Notepad to code a .htm file and then view it with the browser by adding (just after <HTML>):
<SCRIPT LANGUAGE=VBScript>MsgBox Hello World </SCRIPT>
So I changed your sample program to begin
resp = <HTML><SCRIPT LANGUAGE= VBScript >MsgBox Hello World </SCRIPT>
resp = resp & <font face=Verdana size=2>Welcome visitor from
This doesn't look right to me, and VB doesn't like it, but I don't know what to do.
John
Re: embedding VBScript in outgoing HTML
by wodSupport, Wednesday, December 01, 2004, 14:48 (7295 days ago) @ John Baker
John,
this code works for me:
[code] resp = <HTML>
resp = resp & <SCRIPT LANGUAGE= VBScript >MsgBox Hello World </SCRIPT>
resp = resp & <font face=Verdana size=2>Welcome visitor from
resp = resp & User.RemoteIP & . This is <b>wodWebServer</b>, version & Http1.Version
resp = resp & <BR>You requested resource & User.Request.Path & User.Request.PageName
resp = resp & </font></HTML> [/code]
Re: embedding VBScript in outgoing HTML
by John Baker, Wednesday, December 01, 2004, 19:35 (7295 days ago) @ wodSupport
It works for me too.
Thankyou.