Home Uniquely NZ Travel Howto Pauline Small Firms Search
Diary of System and Website Development
Part 9 (June 2003 - August 2003)

1st June 2003

Checking forms are Valid

I have got tired of becoming a target for junk mail just because I have an email address which can be gathered by robots on my page - I am now seeing seeing 70-100 a day junk mails on Freeserve and having to find one or two real ones every week in the average batch of 550 I look at using Remote Mail in Outlook . I am therefore going to change to a simple form. The following code snippets have been put together to check an email address has been given so I can reply and to trap submissions before the sender has filled in the box. It works by checking when the form is submitted. The onSubmit event handler checks the various fields and a return value of true allows the submit to continue or false leaves on on the page. Each field generates its own alert if there is a problem. The concept is based on work by McFedries

JavaScript Snippets to cut and paste for checking a form has a valid email field and that one or more fields have visible characters present

<script language="JavaScript" type="text/javascript">

// Simple check for valid Email address in string

function valid_email(email_address) {
 if (email_address.length < 7) {return false};
  at_location = email_address.indexOf("@");
  dot_location = email_address.lastIndexOf(".");
 if (at_location == -1 || dot_location == -1 || at_location > dot_location ) {return false};
 if (at_location == 0) {return false};
 if (dot_location - at_location < 3 ) {return false};
 if (email_address.length - dot_location < 3) {return false};
 return true

//Check for empty or only non visible characters in string

function its_not_visible(string_value) {
 var not_visible = " \n\r\t"

 for (var counter = 0; counter < string_value.length; counter++)
{  current_char = string_value.charAt(counter)
  if (not_visible.indexOf(current_char) == -1) {
   return false
 return true

//Submit handler can be extended to many more fields

function submit_handler() {

if( its_not_visible(document.forms[0].commentbox.value) ){

alert('You have not entered anything into the message!');
return false

if( valid_email(document.forms[0].email.value) ) {
return true
else {
  alert('Please enter a valid email address so I can reply');
return false

The code above should be in the head and the submit_handler() function is called as below. Note the return is essential in the onSubmit="return submit_handler().

<FORM METHOD=POST ACTION="http://www.yoursite.com/scripts/form_response.ihtml" onSubmit="return submit_handler()">

The code can be copied and pasted If you copy by hand beware as it is impossible to tell 2x single quotes '' from a double quotes " in many character sets.

The following is a do nothing test so it is safe to try it with the submit button

Email address: 

If you want to try out a real form then Email me Feedback - this opens a Form in a Popup Window. AIDA Worldwide System Tool Whilst looking for a way to get some information on a friends computer I found a reference to Aida. This a superb piece of freeware which you can download which does a complete analysis of the hardware and even some of the software in a PC. It has a huge built in database and also seems to gather the most incredible amount of data on everything - for example it told me the following on my memory module.

Memory Module Properties	
Module Name	Micron Tech. 16LSDT1664AG-10EC7
Serial Number	896073732
Module Size	128 MB (2 rows, 4 banks)
Module Type	Unbuffered
Memory Type	SDRAM
Memory Speed	PC100 (100 MHz)
Module Width	64 bit
Module Voltage	LVTTL
Error Detection Method	None
Refresh Rate	Normal (15.625 us), Self-Refresh
Highest CAS Latency	3.0 (8.0 ns @ 125 MHz)
2nd Highest CAS Latency	2.0 (10.0 ns @ 100 MHz)
Memory Module Features	
Early RAS# Precharge	Not Supported
Auto-Precharge	Supported
Precharge All	Supported
Write1/Read Burst	Supported
Buffered Address/Control Inputs	Not Supported
Registered Address/Control Inputs	Not Supported
On-Card PLL (Clock)	Not Supported
Buffered DQMB Inputs	Not Supported
Registered DQMB Inputs	Not Supported
Differential Clock Input	Not Supported
Redundant Row Address	Not Supported
Memory Module Manufacturer	
Company Name	Micron Technology, Inc.
Product Information	http://www.micron.com/products/category.jsp?path=/DRAM

It is a 2.4 Mbyte download from http://www.aida.hu for the most sophisticated version - a slightly cut down personal version can fit on a floppy ang it can be configured to run an audit on every machine on a network daily. It has about 70 screens as comprehensive as the on above as well as graphic drive checks and software outputs including easily lost information such as the install keys for software such as Windows 98 and XP. A full save to disk or a printout would have been invaluable when I was rebuilding the machine as it gives the website address for every driver or update required.

Telegraph Connected is a good site for basic computer hints - I checked it out whilst confirming that Aida was legitimate software, especially as it was from Hungary! Connect told me that there is now a set of PowerToys for XP and finally for Windows SE which I downloaded and installed - Search the Microsoft site for TweakUi and there is a version 1.33 covering all operating systems up to XP and one for XP. With the Tweak UI 1.33 update, you can adjust your Windows User Interface, including menu speed, window animation, and Microsoft Internet Explorer. Whilst I was at updating the system I installed ActiveX9 in case it improved the video for DVplus.

Microsoft System Tools There are a number of useful diagnostic tools which are accessed by Start -> Run and enter name in box. They include

25th June 2003


I started looking seriously at Broadband because of the changes to telephone tariffs which increased the cost of Internet calls to 0845 numbers. The neighbours have the service from Tiscali which seemed to be fast and reliable and when I checked on their web site I discovered they provided a 256 kbaud service at under £20/month with free ADSL modem and two splitters and connection fees reduced to £35. This seemed an offer which could not be refused and after some telephone checks I ordered. I was not surprised it was on 15 working days set up and delivery at that price and was pleasantly surprised when it came in less than half the forecast time. They also kept in touch with letters and four emails as each stage of testing and order progression were passed.

The installation with a USB ADSL modem was very easy and it was up and running in 15 minutes. The cables were short and I had ordered an extra 10 metre RJ11-RJ11 cable from the splitter to the modem, otherwise nothing more was required. They performance is excellent - the 256 kbaud service is provided by throttling a normal 512kbaud service and it often peaks higher and averages to an incredibly steady 31.2Kbyte/sec download rate. On occasion the throttling fails and you get 60Kbytes/sec - I had one 2Mbyte download from McAfee in 35 seconds. I assume it will get worse as more users start up - they promise the standard 50:1 contention. At present it is excellent and has transformed browsing as well as providing an always on service. The ADSL connection is made to look exactly like a Dial Up Connection (other than having adsl in place of a number) and you can either log in once at the start of the day or as required. The IP address is not fixed and changes if you log in and out. A firewall is very desirable with such a connection as the pool will become known and you are on-line for a long period. ZoneAlarm is intercepting a large number of probes.

The performance was so impressive that Pauline immediately asked if it could be made accessible on both machine. Long term a wireless network based round a modem/router/wireless box such as the D-Link 604+ looks the way to go but speeds are increasing and costs falling so a software solution such as Microsoft's Internet Connect Sharing (ICS) software looked the way to go. The following sections will form the basis of a new page in the Howto Series of Technical articles and extend the existing Painless Networking pages

27th June 2003

Windows Internet Connect Sharing (ICS) - Overview

Microsoft provide Internet Connect Sharing (ICS) software as part of Windows from 98 SE onwards. It was regarded as one of the 'killer applications' which justified the upgrade from earlier versions and is a must once you have an always-on broadband connection. It looks simple to set up but it seems to have been extremely problematic to many judging by the many and various pages on the web. The ICS and TCP/IP software with Windows SE and ME have flaws and can cause registry problems if you install and uninstall them too often, especially without frequent reboots. I have had to edit the registry twice whilst learning about ICS and even the procedures here may not be foolproof so make backups and be prepared for, in the limit, a clean reinstall of Windows before this will work. I should say that at the end I have found it worthwhile and will use it in the future.

If you want extra information and to know what you may be letting yourself in for have a look at the Microsoft Technical Article Q238135 at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q238135 which also has a lot of links.

The fundamental requirement, if you want to avoid problems, is that you must a tried tested and fully working network using TCP/IP and a working Internet connection before you starting to load ICS. Note - you only load ICS software onto the machine with your Internet Connection which can be Dial-Up or ADSL. If your ADSL connection is via a network card your need to have two cards, one for the modem and one for the connection between machines.

In my case the modem is a USB connection and I had a working network described fully in Painless Networking using IPX/SPX. I was not keen to add TCP/IP but I have found that one can add the TCP/IP protocol in addition to IPX/SPX and separate the file and printer sharing from the Internet Sharing by removing all the bindings to File and Printer Sharing And Client for Microsoft Networks in all the references to TCP/IP which is test show to allow safe connections. Tests using ShieldsUp at the Gibson Research Corporation web site show this to work and that the configuration is as good as one can get without a firewall.

Firewall issues: My favourite free Firewall is ZoneAlarm and I needed to add the range of IP addresses for the machines so they would be visible in the early stages of setting up. The free version does not handle ICS on the Server machine (the one with the shared connection) and the Internet Zone security level had to be reduced to medium (ie no stealth facility) to let it work. I have upgraded to the Pro version on the access machine running ICS to get full protection. The free versions will then also work in high security on the client machines and do need to be upgraded.

Installing Internet Connection Sharing (ICS) Software - Details

Now to the nitty gritty. Installing ICS on an existing network set up as per Painless Networking falls into several parts:
  1. Adding, configuring and testing the TCP/IP protocol on all machines.
  2. Installing the Internet Connection Software on the Server machine.
  3. Checking and changing Bindings of the ICS and associated Protocols on the Server Machine.
  4. Further setting up of protocols on all the Client Machines to utilise ICS
  5. Configuring the Software accessing the Internet on the client machines (Internet Explorer and Email etc.)
  6. Checking it is all 'safe' at the Gibson Research Corporation Site.
During the first 4 parts it is best to disable your virus checker and any firewalls - active virus checking and firewalls do not mix well with TCP/IP loading and configuration. It is however important you do not connect to the net until the breaking of bindings has taken place - on an ADSL continuous connection I am seeing hundreds of probes per day, over two thousand intrusions have been blocked by ZoneAlarm Pro so far on the day I am writing this and about half of them were rated as a high security risk. I hope it is unusual.

1. Adding TCP/IP safely on all machines.

In Painless Networking I showed how to use IPX/SPX protocols for file and print sharing to separate the Internet completely from the Local Area Network. We now need to allow Internet traffic to be passed over the Network. This means adding the TCP/IP protocol to all the machines as only it can carry the Internet traffic. I have found that one can add the TCP/IP protocol in addition to the IPX/SPX protocol and provided one separates the file and printer sharing from the Internet Sharing by removing all the bindings to File and Printer Sharing And Client for Microsoft Networks in all the references to TCP/IP it is almost as safe as before. In order to work with all flavours of Windows including Windows 95 and minimise the risks from use of 'clever' features I have chosen to use fixed IP addresses for the client machines as well as the Server which is already forced to by the ICS software. It also makes any testing easier.

I will not go into how to add a protocol as it is covered in Painless Networking and if you have not already understood simple local networks you should probably not be trying to add ICS yet. When you have added the TCP/IP protocol it is probably best to reboot before changing the various settings on the tabs accessed via the Properties button. The end results are shown at various points below for the Clients and Server but at this point just setting the IP addresses and breaking all the bindings is enough. The settings for a typical client is below. The Server has IP address, the clients must have different last number up in the range 2 to 255 - it is logical to start at 2. Note - when you access a TCP/IP protocol it often warns you you should not change it - ignore the warning. After you have unticked all bindings you also have to confirm that you meant it.

Client IP address tab   Client Bindings tab

At this point you may want to confirm the machines can see each other via TCP/IP. As we have fixed addresses it is very easy to check everything is working before installing ICS by using Pings. Ping is a simple (DOS level) system utility accessed by typing ping in the Run box (Start button -> Run and fill in the box). Ping etc., should get a response from a machine with IP address etc., whether sent from the machine itself or from another machine on the network. - if not then something is amiss and needs to be sorted. Pings also enable you to setup/check your firewall when you reinstall it. You would be wise to also check the changes have not stopped your file etc sharing working and that whatever mechanism you use for Internet Access still works - it will be very much more difficult to debug once the ICS server software is installed.

2. Internet Connection Sharing Software installation

You install ICS from Control Panel -> Add/Remove Programs to Windows Setup tab to Internet Tools and tick Internet Connection Sharing box and it runs a wizard which tries to detect your network and connections. In my case it failed to automatically detect and I had to select from drop down boxes the Dial Up Network and LAN adapters manually. They are accessible in the Internet Connection Sharing settings panel.

You reach the Internet Connection Sharing settings panel after leaving the Wizard from Start -> Settings -> Control Panel -> Internet Options -> Connections tab where you will find a new button Sharing in the LAN and Internet Sharing Settings at the bottom. Once you have got there it is worth ticking the Show Icon in Taskbar box so you can access the settings and turn it on and off easily.

Internet Connection Sharing

You will need to check/change the dialling options for your chosen default DUN connection - I have chosen to connect to ADSL manually at the start of the day but it should be possible to select the Always dial setting to connect automatically.

3. Checks and Changes on the Server after installing ICS Software

As I noted above installing ICS sets the TCP/IP address to be fixed at which it why it is best to manually set the ICS 'server' machine to and the other machines to be etc. when you add/setup TCP/IP ready to install ICS. After the ICS install I confirmed the IP address of the Network Adapter (now named home) was and checked the bindings were still unticked for Client for Microsoft Networks and File and Print Sharing. Note - when you access a TCP/IP protocol it often warns you you should not change it - ignore the warning. After you have cleared all bindings you also have to confirm that you meant it.

The following show those important tabs.

Server IP Address   Server Bindings tab

The rest of the tabs were not changed from the defaults but you can click on them in the following list to see them on my machine.

Server Network after installing ICSYou will notice that after installing ICS several more network protocols and binding entries have appear and the existing TCP/IP ones have been renamed TCP/IP (Home) and TCP/IP (shared) as shown.

The items with red crosses have been added and those with a red sidebar have been changed where underlined.

The yellow sidebars indicate the TCP/IP protocols which need to be checked and modified as required.

In particular one must untick the bindings to Client for Microsoft Networks and File and Print Sharing on the new TCP/IP -> Internet Connection Sharing Bindings tab accessed via the properties button.

Click to see the TCP/IP -> Internet Connection Sharing Bindings tab

The TCP/IP (Home) you checked above and TCP/IP (Shared) Bindings tabs should be unchanged but I would still check that they look the same as the above with the bindings all unticked.

4. Client Machines - Additional Network Setup

The various documents I have read are inconsistent on the best TCP/IP settings for the client machines but the following is logical and works. I suggested earlier that it was best to set up to use fixed IP addresses. This enables one to check everything is working before installing ICS by using Pings. Ping is a simple system utility accessed by typing ping in the Start button -> Run and fill in the box. Ping etc should get a response from the machine set correctly IP address etc. - if not then something is amiss and needs to be sorted. A firewall may be the problem. Once that is working the machines need to know where the gateway to the unstick is and where the Domain Name Server (DNS) can be found hence those tabs are set up. The host name I gave on the DNS tab is that of the client machine and you will need to fill that in appropriately. WINS is nor required.

client_ip.gif - 30617 Bytes   client_bindings.gif - 23800 Bytes

client_gateway.gif - 15810 Bytes   client_dns.gif - 17974 Bytes

The other parameters are as per the defaults. Click below for details.

5. Program Settings for Internet Explorer and Email.

We should now be on the home straight. The programs on the clients which access the Internet expect to use a local Dial-Up connection and need to be told to use the LAN. To get the Browsers Set-up go Start -> Settings -> Control Panel -> Internet Settings -> Connections tab - just either tick the box Never Dial a Connection or the box marked LAN depending on the flavour of Windows and that is it. Email packages are similar but one has to do it for every Account separately. FTP programs may need to have the Passive Transfers box ticked

6. Re-enable your virus checking software and Firewall(s) and check you are secure.

If you use ZoneAlarm the Server machine needs ZoneAlarm Pro or to run with the Internet Zone in the medium (non stealth) setting. You will need to put the address range used into the trusted zone on all machines. Clearly Virus checking needs to be re-enabled on all machines as soon as the set-up is complete. Now go to the Gibson Research Corporation Site http://www.grc.com and find the ShieldsUp tests and check all is secure.

Conclusions on ICS

Setting up ICS turned out to be the most challenging piece of system setting up yet but the results are well worth it. Access via the Network can not be differentiated from having the connection on he actual machine you are using. It provides broadband access with no loss of speed and the only 'cost' has been getting ZoneAlarm Pro 4 for the Server machine to maintain the same level of security as I had using the free version 3.7.193 The separation I have shown how to implement above should be sufficient but it is better to be safe. The number of probes I am seeing on an ADSL continuous connection is alarmingly high - over two thousand three hundred intrusions were blocked by ZoneAlarm Pro in 16 hours on the day I wrote this and about half of them were rated as a high security risk- ie looking for weaknesses for hacking attempts.

11th July 2003

Apples - the iMac X

I have been playing with one of the latest iMac with the new OS X (version 10.2) operating system. The new operating system looks and feels very nice and the system I was using had Microsoft Office X installed allowing a direct comparison of the two different approaches and implementations. My feeling is that the iMac X with Microsoft Office X is a very practical and viable alternative to a Windows based PC system with Microsoft Office - more built in software but less easy to expand. Networking looks very easy and in most respects the iMac X is equivalent to a Windows XP in having easy Networking, Internet Connection Sharing and a built in basic firewall. It is the first Apple I have felt comfortable using.

Every time I use an iMac I have to find a manual to find out what the special keys are that are equivalent to right Click, Control, Alt etc. This time I have written them down so I do not forget and hope it will be useful to others who have to make occasional use of a Mac when they are used to Windows.

Special keys on IMac X

Effective use of the iMac depends on use of a number of special keys. These allow access to context sensitive menus, change the action of the mouse click and access to special characters. The keys are the 3 grouped at the bottom left of the keyboard plus the shift key and are all repeated at the right in the latest iMacs. Thebottom three are the Control, Option and Command keys.

  • The Control key is in the usual position at far bottom left and is marked control.

  • The Option key is the key second from the left at the bottom of the keyboard and has a dividing line symbol with an alt above it.
  • The Command Key is the key third from the left at the bottom of the keyboard and has a small apple icon and a funny hash with loops symbol.

Context sensitive actions

Control Click is the most powerful and useful action on an iMac. It is the equivalent of a right click on a PC and provides a context sensitive popup menu. You can use it on a selection, icon or just about anywhere. It will satisfy 90% of the actions you need.


Option is the key concerned with copying. Holding Option whilst dragging makes a copy of a file or folder. The cursor will change to a + whilst you are doing so.

Multiple selections

  • Shift Click is used for a multiple selection in a list. Click the first item, shift click at the end of the items you wish to select and all the items between will be selected.

  • Command A (Select all) Holding down the Command key and clicking A selects everything in the list

  • Command click makes an additional selection whilst selecting icons or in a list. It is actually more powerful and toggles any selection so can be used to remove items in a multiple selection.

Commands and Keyboard Shortcuts

The Command key is also the equivalent of control on a PC and provides single key access (keyboard shortcuts) to all sorts of actions when you holding down the Command key whilst clicking the second key - many are shown at the end of drop down menu items. The most useful and commonly used are to do with copy and paste, in particular select all:
  • Command A Select all
  • Command C Copy
  • Command V Paste
  • Command X Cut
  • Command Z Undo
  • Command S Save
  • Command P Print

You will note the above all use the same letters as Windows but in combination with the Command key.

Valid HTML 4.01 Copyright © Peter & Pauline Curtis
Content revised: 2nd August, 2020