Archive for August, 2005

Web Development can wreck your brain

Posted on the August 29th, 2005 under Uncategorized by

In a technique similar to AJAX, I’m trying to fix a chat system that has a hidden iframe that refreshes in the background, and updates the screen by appending new posts to the bottom.

There are straightforward aspects. To append text, use a div and then innerHTML such as:

document.getElementById(‘chattextdiv’).innerHTML = document.getElementById(‘chattextdiv’).innerHTML+extra;

The problem I’m having is to get the page to automatically scroll down, and this is where battle of the browsers begins.

My proposed solution is to generate an anchor that can be focused on. But browsers handles this differently.

Firefox gets first prize for working perfectly. IDs that are dynamically generated in JavaScript are recognized and are focused.

Opera gets second prize. It recognizes IDs, but will only focus them if they have a text between the tags, eg. < name="newstuff">text. It will not focus < name="">.

Perhaps Opera is more compliant in the sense that the text gets selected. When there is no text to select, it doesn’t bother to focus.

Internet Explorer does not recognize IDs in the <> tag – whether JavaScript or HTML generates it. Update – works if you have a tabindex.

My proposed solution is to now use two divs. One that contains the chat text that continuously expands. The other wraps the chat text and an anchor.

In any case, perhaps this is the exciting part of web development – trying to find solutions, and having to stretch your brains at that. I’ll report again on the results.

Dennegeur Primary Tragedy

Posted on the August 29th, 2005 under Uncategorized by

The recent tragedy of a bus overturning during a school outing – three learners and the bus driver were killed, around 40 others injured. This incident has shocked Cape Town, everyone sharing in the suffering of the bereaving families..

One personal lesson is how sudden one’s life can change. Perhaps in this, people will learn to appreciate each other more. Our condolences go to the families…

IE’s JPEG Rendering

Posted on the August 10th, 2005 under Uncategorized by

We all know Internet Explorer’s CSS rendering sucks, but I think their JPEG rendering isn’t do well either. Have a look at the following image, one taken from Firefox, the other from IE6.

Why does the one on the right (IE) seem so blurry? Doesn’t it make you lose confidence in trying to get a good compression on your image?

Islam in Salt River

Posted on the August 7th, 2005 under Uncategorized by

Yesterday I was in Salt River taking photos for a forthcoming booklet on the history of the Soutrivier Kifajat Genootskap (Salt River Muslim Burial Society). Here’s a collage on five Islamic institutions in Salt River.

  • Tennyson Street Masjid
  • Addison Street Masjid
  • Coleridge Road Madressa
  • Darul Ilm – Pope Street
  • Kipling Street Muslim Primary School

These institutions will also be covered on the Muslim Directory

Congratulations to the People of Mauritania

Posted on the August 6th, 2005 under Uncategorized by

Events there recently have baffled me. The army has come in and told President Maaouiya Ould Sid Ahmed Taya not to come back to the country, much to the joy of its people. They called him a dictator, which very few dispute.

Then the African Union, South Africa included, France and the United States calls this an unwarranted move, suspends their membership, and demand an urgent return to ‘constitutional process’.

Why does this read so: blah, blah, blah; blah, blah, blah.

And this probably reflects the hypocrisy in the world. These leaders would rather prefer a ‘constitutional dicatorship’, than a revolution supported by the masses. I haven’t heard anyone in Mauritania objecting to the new status quo or fighting to have ‘ex-President’ Taya back in charge.

How many people will shed tears and demand an urgent return to ‘constitutional process’ if the same happened to Mugabe?

I wonder what the AU will do if the Mauritanians change their constitution a.k.a. Pervez Musharraf-style, another dictator who, if you remember, promised to stand down, but felt compelled to continue because ‘Pakistan needs him’.

The bottom line is that the AU’s peer review is nothing by a ‘scratch my back I scratch your back’. If General Abubakr could revitalise Nigeria after Sani Abacha’s madness, let’s hope the same could be done for Mauritania.

Changing CSS Properties via JavaScript

Posted on the August 6th, 2005 under Uncategorized by

Web developers always need to have an appreciation for information literacy – the ability to realise that there is information they don’t always have but may need (sometimes urgently), and have the ability to locate it.

I’m sometimes amazed how developers delegate this responsibility to ‘someone that knows’, where in reality ‘someone that knows’ is simply ‘information literate’. They themselves ‘do not know’, but know how to locate the needed information.

This happened recently where I had to help someone find out how to change CSS properties via JavaScript. So here’s the code:


document.getElementById(‘yourElementWithId’).style.fontSize = “24px”;

document.getElementById(‘yourElementWithId’).style.fontFamily = “Verdana, Arial, Courier New”;

document.getElementById(‘yourElementWithId’).style.textDecoration = “underline”;

document.getElementById(‘yourElementWithId’).style.fontWeight = “normal”;


One of the unexpectant things was that CSS uses dashes (-) in between properties, e.g. font-size. It seems that for JavaScript, you drop the dash, and capitalize the next letter, e.g. fontSize.

More JavaScript for Usability

Posted on the August 6th, 2005 under Uncategorized by

I’m a great fan for using JavaScript to enhance usability of web development, more specifically ‘Visibility of System Status’, as Jakob Nielsen puts it.

Here are links to sites that show how JavaScript can be used to improve usability. In particular, I was looking to highlight the current selected radio button in a group.

Be prepared though to be disappointed in the way so of them have been implemented… If they are not hard-coded, they rely on labels. The problem with the second approach was if you already had other form elements above that which used labels. Those labels were highlighted as option selected one.

Nonetheless, its always good to implement, and put some work arounds.

Also see:

Its not the machines, its the people!

Posted on the August 6th, 2005 under Uncategorized by

These words come from a forum on Tech Republic, on why IT sometimes sucks. I can only agree. IT is often full of politics, poor decision making and counter productive decisions. Some people make decisions to support the product, others do to support themselves.