Internet

WWW Technical
Active X and VB Script

Overview | Techniques
[+] Visual Basic

Overview

Active X (formerly Object Linking and Embedding (OLE) and VB Script allow a programmer to enhance and extend the standard html capabilities. Java from Sun Microsystems is a competing language standard for the Internet.


Techniques

The rest of this page list techniques I have found in a variety of references. Not all are tested so let me know if they need to be modified.

Adding code

The following code enables you to insert a popup window into your hrml code;

Notes


In your code you need ;

<A HREF="javascript:{}" LANGUAGE="VBScript"
ONCLICK="call PreVu1.Popup(GetURLBase + &quot;\winpop\hints\hint1.htm&quot;, FALSE)">
<IMG SRC="tip.gif" border="no"></A>

The following ActiveX control makes a popup control available to your page, followed by th VBScript required to get the BaseURL.

</BODY>
</HTML>
<OBJECT ID="PreVu1" WIDTH=0 HEIGHT=0
CLASSID="CLSID:A23D7C20-CABA-11CF-A5D4-00AA00A47DD2"
CODEBASE="#Version=4,71,115,0">
<PARAM NAME="_ExtentX" VALUE="0">
<PARAM NAME="_ExtentY" VALUE="0">
</OBJECT>

<SCRIPT LANGUAGE="VBScript">
<!--
Function GetUrlBase()
Dim Base, Slash, index
Base = Location.HRef 'Where is this file loaded from
If (Left(Base,5)) = "file:" then 'is it a file from a local disk
Slash = "\"
ElseIf (Left(Base,5)) = "http:" then 'or a HTTP Page from a server
Slash = "/"
Else
Base = ""
Slash = "/"
End If
'We now know what characters to look for....
index = Len(Base)
While index > 0 And Mid(Base, index, 1) <> Slash
index = index - 1
Wend
Base = Left(Base,index)
GetUrlBase = Base
End Function
-->
</SCRIPT>

© 1997 V/2-Com (Verhaart), P O Box 8415, Havelock North, New Zealand.