June 21, 2000

History Information

Question: Is it possible to display the address of the previous Web site as a string so that I can use it elsewhere? Answer: If the user got to your page by clicking on a link, you can find the name of that page at document.referrer.By the way, Netscape has

Incorrect Rounding with Math.pow

Question: I have noticed that all rounding to x decimals scripts uses the following format: tenToPower = Math.pow(10, nDecimals);newNumber = String((Math.round(nNumber * tenToPower) / tenToPower)); However, that doesn’t work with numbers like 0.5005, yet DOES work with 0.50051. Any idea why, and how to fix the script above? Answer: Simply

Dbspace Marked Down

Question: I have tried to reorganize Informix chunks on my disks. So I stopped the Informix and started to copy chunks to a new location with a cplv command (AIX). After the copy was successful, I changed the links to new logical volumes, which contain copies of each chunk. But

Use SQL Server Savepoints Intelligently

You can use savepoints in rolling back portions of transactions to predefined locations. A T-SQL savepoint defines a location to which a transaction can return if part of the transaction is conditionally canceled. Keep in mind that SQL updates and rollbacks generally are expensive operations. So savepoints are useful only

Browser-Neutral Code for Referring Style Objects

Programming with style sheets is never an easy task if you want to write browser-neutral HTML code. This is because the DOM (Document Object Model) of the Internet Explorer and the DOM of Netscape Navigator browsers are not the same. But don’t despair?here is a code fragment that shows how

Setting/Resetting Checkboxes with a Single Click

I have a bunch of files on the server that I wanted to be able to select, for example, to delete them or to give them special treatment. Thus, I made a table with their names and a checkbox for each of them. However, I also want to be able

Creating a Drop-Down List File in ASP

Using this tip, you can create a drop-down list, which is populated from a database, and include it in a Web (ASP) page. This will basically increase the performance via the conventional method.First, you will use a trigger to write to a file whenever the database table is updated. The