October 17, 2001

Detect whether a field on a form has been edited

Many tip & trick collections report that you can learn if the contents of a text box has been modified by sending a EM_GETMODIFY message to the control. Actually, getting this information is much more simple. Just test the DataChange property: if non zero the field has been modified since

Use Script Caching

Using script caching when a script is extremely large or embedded across multiple pages can improve the performance of code in JavaScript. It also allows you to easily distribute one code for use on many pages.Include the entire script in a .js file as shown below: This causes the browser

Alter Your Browser’s Scrollbar Colour

There are CSS attributes responsible for controlling the scrollbar’s coloring, everything from the background, foreground, to the little arrow at the two ends of the scrollbar. –Your Normal code goes here These attributes can be applied not only to the BODY element, but basically any element on your page that

A Fast Way to Check if a Table Is Empty

If all you need to know is whether a table is empty, using COUNT(*) is a bad alternative, because if the table is very large, it will take some time to count all the rows. Instead, use a SQL statement like the following: SELECT ‘The table is NOT empty’ WHERE

Using SQL Server 2000 User-Defined Functions to Retrieve Table-Like Data

In the SQL Server 7 days, when we wanted to calculate data and return it, we usually used stored procedures. User-defined functions are a new feature of SQL Server and they are much better as their results can be used in the ‘From’ clause of a ‘Select’ statement. Imagine that