Click to return to the Essentials home page    
Web Workshop  |  Essentials

Bill the Bard, Roses, and Getting Around


Jeff Brown
Rafael M. Muņoz
Microsoft Corporation

Updated: February 16, 1999

The following article was originally published in the Site Builder Magazine (now known as MSDN Online Voices) "Web Men Talking" column.

Contents
A Desktop item by any other name ... - Information on Desktop items for Internet Explorer 4.0
Footprints - Tracking users on a Web site
Name that tune - Using databases without server processing
Slick navigation - Building a drop-down list box

We turned to Shakespeare, sort of, to bring you this column's answers. We've mangled the bard a bit in discussing Desktop items, touched on tracking users, revealed some telling secrets on incorporating databases without a bunch of messy server-side stuff, and offered a new way to include navigation on your Web site. One of our answers does relate to cookies, but our cranky editor was tired of hearing about them. (She says it makes her too hungry.)

Now let's get to that muse of fire.

A Desktop item by any other name ...

Dear Web Men:

After downloading the Desktop item, I read the section titled, How We Built Our Desktop Item. It was very interesting, and I look forward to implementing this myself in the future. However, I have one question regarding the code.

The first line of the OBJECT declaration is as follows:

<OBJECT id="MSIE" width=0 height=0 
classid="clsid:11148320-7314-11d0-8a03-00a0c90a90ac">

My question regards the CLASSID. Does that number bear some major significance to the component itself, or is it just a generic number for all Desktop items? If the number is specific to the component, how do you generate the number?

Thanks for all your help,

Larry Rutledge

The Web Men reply:

Larry, great question! We are seeing more and more questions about Microsoft Internet Explorer 4.0. As momentum grows toward its release, Desktop items are going to become a huge item. To take a popular twist on Bill the Bard Shakespeare, a rose by any other name is still a rose. No matter how we identify our Desktop item with the ID attribute (for example, "MSIE"), our Desktop item will always have the same CLASSID value.

What you have here, Larry, is just another plain and simple ActiveX control (er, actually, we mean, a very sophisticated ActiveX control). The Desktop item is similar to any other ActiveX control in that the CLASSID is generic to that type of component; in other words, no other ActiveX component will ever use this CLASSID. You differentiate your component by giving it a unique ID and changing its parameters and attributes.

For those of you who haven't tried Internet Explorer 4.0 Non-MSDN Online link, you can read about it in numerous places on the Web and prepare for the coming of Desktop items. (Remember: Without Internet Explorer 4.0, you won't be able to download the component.)

Two other places to visit are the Internet Explorer 4.0 Technologies page, which can give you a total overview of Internet Explorer 4.0, and the new Demos page  Non-MSDN Online link, which is still in development but will become a helpful resource.

Back to topBack to top

Footprints

Dear Web Men:

Hi, Guys!

I've recently been faced with the problem of analyzing my company's Web site traffic. I've tried a couple of Web site traffic analyzers and I liked what I saw.

But I have one problem:

The Web site gets a lot of visits from users that come in through their ISP's proxy server, messing up the traffic analysis.

I've heard I can more accurately track visitors by using cookies. Can you shed some light on the subject?

Thanks,

Joao Beltrao (MSDN Online Level 2 member, Portugal)

The Web Men reply:

Because IP addresses for users’ computers may change over time, it can be hard to track users by IP address. Your Web server could do a reverse lookup to try to identify and log the fully qualified domain name (FQDN) or host name of users’ computers to identify users better.

But cookies provide an easier way to track users, because they can include unique information that will be sent to the server automatically. The server does not have to look up the user's identification. By sending a cookie to users of your site and including a unique identifier, you can easily tell who revisits your site and how often.

Keep in mind that users can reject cookies when they visit a site, and not all browsers support cookies, so you wouldn’t want to rely solely on them to track usage. But you definitely should consider using cookies to increase the accuracy of analyzing your Web site traffic.

The Microsoft Web site uses cookies to track visitors, and you can check out a non-technical description Non-MSDN Online link of the implementation. (If you are interested in other technical details on the Microsoft Web site unrelated to cookies, you can take a look at the Microsoft TechNet article, How Microsoft Manages www.microsoft.com Non-MSDN Online link.)

You may want to experiment with Usage Analyst, which is included in Microsoft Site Server Non-MSDN Online link. The Usage Analyst FAQ Non-MSDN Online link has some good information about the analyst's features. Trial versions of Site Server are available on the MSDN Online Downloads area. (If you are not a member of MSDN Online, take the plunge and become one now. It's easy!)

Another place to find Web server tracking tools developed specifically for Windows NT is in the WWW Page Counters and Statistics Programs section of the Internet Resources for Windows NT Non-MSDN Online link page.

If you want some more information on cookies, and how they can be used in general, refer to our Bake a batch answer in a previous column.

Back to topBack to top

Name that tune

Dear Web Men:

I am a professional disc jockey and have a Web site that I am trying to put a searchable music database on. I have seen many times where people have implemented this with Microsoft Internet Information Server and the like--but for those of us less fortunate, is there any way to search a database file on the Web server using client-side interface?

To further explain, I do not have access to making things executable and would like to know if there are any ways to have the user's browser and local machine do the work that would normally be done on the server of those much more fortunate than myself. Any help would be greatly appreciated.

Greg Smith

The Web Men reply:

A DJ, eh? Can you name this tune sound clip in four notes? Okay, so maybe not everyone loved Name That Tune on TV as much as we did. But this is really more like find that tune, anyway.

You’re absolutely right, Greg. To access databases on a Web server, you typically would develop executable scripts, or you would at least need to be able to change settings on the server to enable access to the databases. For an overview of using databases on the Web, read Dreaming of Databases by our MSDN Online cohort Mary Haggard in her column, For Starters.

If you have no control over the Web server other than being able to upload HTML pages and read-only content (such as images or audio files), Internet Explorer 4.0 offers you an excellent solution. By using its data binding feature and the Tabular Data Control (TDC), you can very efficiently access data stored on the server, simply by adding a few attributes to existing HTML tags. The TDC can read data from a comma-delimited text file on the server, and allows sorting and filtering of the data on the client, without interacting with the server at all (other than the initial download of the data).

All you need to do is export the data from the database to a comma-delimited text file, which is possible with virtually any database or spreadsheet program. If the database cannot be exported to that format, the TDC also allows you to specify different column separators and row separators for the text file. Once you have the database in text file format, upload it to the Web server alongside your HTML pages and other read-only content. Any of your pages can then refer to the database if they contain the TDC and the appropriate attributes in HTML tags.

We have put together a sample that uses data binding and the TDC to access a database of music titles. Just for kicks we solicited favorites from members of the MSDN Online team to create the database; note the interesting music preferences. (But first note that you must have Internet Explorer 4.0 installed to run the sample.)

View TDC sample.

The TDC is just one example of a Data Source Object (DSO) that can provide data to Internet Explorer 4.0. You can develop your own DSOs using information in the Internet Client SDK, and there is also a Data Source Objects area in the MSDN Online Tools & Samples area.

Check out the updated DHTML, HTML & CSS area for more information on dynamic HTML, data binding, and the TDC. You can also find a helpful article in the July issue of Microsoft Internet Developer (MIND) magazine Non-MSDN Online link.

(If you guessed the tune was "Beeping Alarm Clock" from the MSDN Online Downloads area, you were right! Come on, you didn't get that?)

Back to topBack to top

Slick navigation

Dear Web Men:

At the Site Builder Network home page, in the left-hand side, you have a selection criterion for International sites, under which you placed a drop-down menu. Usually, a drop-down menu is accompanied with a SUBMIT button. I want to know how to create the menu with a number of choices, without the submit button. When I select a choice, it must jump to the document linked using hyperlink, or otherwise. This document must appear in another frame, usually the frame used for displaying contents, the bigger one.

Thanks,

Raja Rajagopalan

The Web Men reply:

Surprise, Raja! The Web Men are everywhere. Raja actually sent the above question to one of our favorite columnists, Mary Haggard, who promptly forwarded it us, knowing this was right up our alley.

So you want to use a drop-down list box and "automagically" direct a link to be displayed in another frame, similar to what we are doing on the Site Builder Network home page. Through the miracle of JavaScript, this is fairly simple--and from previous columns, you already know that directing output to other frames is even simpler. We have created a sample with a small FORM that contains our drop-down list box menu.

View Drop-Down List Box sample.

View source code.

When you check out the sample, you'll notice that--nothing up our sleeves--we have created a slick way of navigating our site without having to use a SUBMIT button with the drop-down list box.

Jeff Brown, when not forcing family and friends to listen to Zydeco and country blues music, provides technical support for the Microsoft MSDN Online with a smile.

Rafael M. Muñoz (the even bigger smile above) is a part-time Adonis, and full-time support engineer for Microsoft Technical Support. He takes it very, very personally every time you flame Microsoft.

Write us!



Back to topBack to top

Did you find this article useful? Gripes? Compliments? Suggestions for other articles? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.