Please Note! This tutorial deals with VBScript and Active X discussions. In order to use or see the script perform, you need to be running Microsoft Explorer.
“VBScript” is a nice short way of stating Microsoft’s Visual Basic Scripting. It is a strict sub-set (little portion) of the Visual Basics for Applications (VBA) language. (huh?) It’s the Microsoft version of Java (sort of). (oh) And it’s the leading scripting language used in Active X.
Advertisement
Active X vs. Java
Around 1995 0r 96
–
someone said,
“
Let there be motion on WWW Pages!!!
”
Someone else seconded the motion and everyone went off looking for a simple programming language to do it. The first one that really took was Java. It
’
s an object oriented programming language created by a guy named James Gosling at
. This was a nice programming that allowed for some pretty interesting movement. It also ran other little programs like counters or image maps.
Where Active X comes in is through Bill Gates and the fine people at Microsoft. Active X is Microsoft’s vision for interactive and movement-filled web pages. I’ve used it a couple of times. It’s actually pretty easy to use. One of the problems with Java is that you still need to write it out. Active X attempts to get rid of that. You can call up some activity (an “object”) with the click of a button. It’s all pretty slick. One drawback though.
It only works on Microsoft Explorer, or Netscape with plug-in.
And probably only will for a few generations.
Why? Because there is no real need to have it work everywhere, Java is supported by Explorer and Netscape. What Microsoft is pushing is ease – not something new and better.
s when Microsoft began playing with this format they called OLE,
Object Linking and Embedding
. It was a way to create documents (spread-sheets mostly) that would allow many different working parts to all be stuck within the same domain. The parts would all do different things, and they would all work together. A good idea. Each part was referred to as an OBJECT. Each independent and each fully functioning.
Notice each object has its own ID name and parameter settings. Just like Java, these little guys need to have their own defined space. The class ID denotes a specific thing that this object does. In this case, it sets up a timer. See the name, “IeTimer1?” It also tells Explorer that it may need more power.
Some of you may have noticed that you were asked to “sign” little contracts when you tried to access this page. The reason is that this VBScript is one that is not fully recognized by Explorer until some extra little programs are installed. When you said OK to the download, the Explorer browser got the needed programming and installed it.
It’s a truly slick little system.
This is the actual look of the clock face. Thus the name, “IeLabel1.” Note that this Object is the one encased in the TABLE. Here you can change background color, change text color, change font type, font name, and add a caption if you want. Each of the parameters are fairly self-explanatory. Feel free to change them around and add new colors and text styles. The Object will respond.
Advertisement
Adding It To Your Page
You can grab the entire VBScript from above. Just cut and paste. Just be sure to have it all: the script, and both objects. Without all three entities, this pup won
’
t work.
Also remember that if you will probably have to post the script to try it out. Certain entities are being called for. So post it before you look at it to see if it works. It probably won’t run right off of the hard drive.
When Do I Use VBScript?
When you are positive that your viewer will be using Explorer as their browser. If you
’
re not sure
–
use Java Script. Both script formats are supported by Explorer, but only Java Script is supported by Netscape.
Keep in mind though, if your page is complete without the VBScript, go ahead and use it. Netscape is wonderful at ignoring commands it doesn
’
t understand. For example, if you use the clock above, people using Explorer get the time. People using Netscape get nothing. That
’
s not bad if the clock is just a little added extra for the Explorer crowd. See what I mean?
That puts the finishing touches on another Explorer tutorial. I use both Netscape and Explorer, and I like them both. To have a preference so strong that you refuse to use one or the other is beyond me. It’s my opinion, if you’re into HTML – learn it all.
The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.
Advertiser Disclosure: Some of the products that appear on
this site are from companies from which TechnologyAdvice
receives compensation. This compensation may impact how and
where products appear on this site including, for example,
the order in which they appear. TechnologyAdvice does not
include all companies or all types of products available in
the marketplace.