May 4, 1998
DR. WEBSITE:
Executing Files From the Web; Moving to Active Server Pages
By David Fiedler and Scott Clark
Dear Dr. Website®: Our team is responsible for about 800 computers located around the U.S. whose users are, in general, excellent operations managers but not computer experts. We need to give users in the field a simple way to download and execute a new application's installation program via our intranet. Since we have a self-extracting, self-executing file that installs a new version of the application, my idea is to have a link on a Web page that downloads and automatically executes the installation file.
This exact process is used when you update your Microsoft Internet Explorer software. It provides a simple way to install software, and the field user doesn't have to know about directories, directory navigation, file execution, and so on. Through what means should I approach this?
Believe it or not, you have probably already done most of the work involved in implementing this. The biggest trick is getting a "hands-off" executable file. This is usually created using products like InstallShield or the Wise Installation System.
Since you've already gotten past this hurdle, the next trick is to load the file from a Web page. If all your target systems are Windows-based, this is relatively easy. Install the finished executable in a directory with the HTML source page, then just reference it with something like this:
<A HREF="http://secret.intranet.com/program.exe">
Click here to download the latest software</A>
Virtually all browsers will now be able to download the .exe program to a place where a user can simply click on it and run it; they don't have to be computer experts to do that.
Unfortunately, this is where it gets complicated. If you truly want users to be able to install software automatically without that last click, you should design a system that includes security to make sure they don't blindly install just any executable file automatically.
While we haven't tried this ourselves, InstallShield has a product listed on its Web site called
InstallFromTheWeb that sounds like it might solve your problems.
Dear Dr. Website®: I own two Web sites that have been built using HTX to IDC to HTX. The sites have several forms that send and receive data to/from a SQL database.
I have been told that IDC is no longer supported by Windows NT Server in the latest service pack and that we must rebuild the site using Active Server Pages (ASP). This situation has severely affected (as in "wiped out") the Required Parameters function of the IDC. The result is a reduction in the quality of the data content for the site.
What's your take? Is Microsoft not supporting IDC in favor of only ASP? I have visited the Microsoft developer site and there is a utility for the change, but it still seems like a bunch of hours for conversion. Is there a fix somewhere that will re-implement the Required Parameters function?
This is one of the pitfalls of working with proprietary solutions, whether they're from a startup firm or the largest software company in the world. If the vendor decides to drop a technology, you can be left out in the cold.
Luckily, Microsoft doesn't drop its support totally. They're clearly supporting ASP and have provided an "out" in the form of a conversion utility, which I suggest you take--and don't forget to continue to explore other options that will let you connect to SQL databases, just in case Microsoft changes its mind and drops ASP in the future!
Dear Dr. Website®: This may sound silly, but I've been trying for two days to figure out just how you guys do the thin black borders around your tables on the WebDeveloper.com home page. Can you tell me?
We certainly can! Of course, we'll be giving up one of our trade secrets. Actually, we just put a table within a slightly larger table:
<TABLE WIDTH="452" CELLPADDING="0" BORDER="0">
<TR><TD BGCOLOR="#000000" WIDTH="452">
<TABLE WIDTH="450" BORDER="0" CELLPADDING="4">
<TR><TD BGCOLOR="#FFFFFF">
this is the info
</TD></TR>
</TABLE>
</TD></TR>
</TABLE>
This way, you can make the table border any color you wish, and you can also determine the width of the border by making the inner table width less than is shown above.
Dear Dr. Website®: This is a follow-up to your onClick/openit JavaScript answers. I want to make use of the openit function so that when a user clicks on a link, two things happen: a file begins downloading to their machine, and a new window pops up with instructions on how to register for a contest giveaway while they wait.
Can I make a link do two things like that by changing the openit script?
Sure, you can make two functions happen from one event. Just add the second function to the end of the onClick statement, as in the example below:
<A HREF="#" onClick="firstfunction(); alert('YIKES');">
Two functions at once</A>
Dear Dr. Website®: I'm doing database queries with Cold Fusion and want to display a certain number of results at a time and then have the user choose to see more. You see this on search engines, where they list the first 20 or so matches and then let you decide to see more. Is there an easy way to do this?
The easiest way to do this is to use Cold Fusion's STARTROW and MAXROWS attributes. For example, to return records 10-20 from the recordset, you would use this syntax:
<CFOUTPUT QUERY = "YourList" STARTROW="10" MAXROWS="20">
#name# #email# #phone# <P>
</CFOUTPUT>
Allaire includes an example of the exact procedure you describe in the National Park search application that comes with Cold Fusion.