A saint’s parenthetical sin at Nationwide’s login blocks Opera-users

UK's Nationwide was listed among the saints in The Register's article for not blocking "other" browsers:

<http://www.theregister.co.uk/content/6/27777.html>

What is going on on their website today proves that even a saint can make a typo .. and let it get to the production site un-tested..

Currently, trying to log in to the Nationwide banking interface <https://olb2.nationet.com/> just brings up a JavaScript error saying Please enter the requested digits of your passnumber. This is the problem:

Computers recognise various types of brackets: the usual (), the square [], the curly {} and the sharp <>. In JavaScript, these have different meanings. Round brackets are used to evaluate expressions, a bit like you use them in maths, or to pass values when calling a function (this is tech jargon for telling a computer to jump to a label, do everything described there and coming back where it was). Square brackets are used to select specific elements from a list.

At some point during the development of Internet Explorer someone must have thought: hey! what if a poor newbie makes a typo and uses () where the computer expects []? It won't work! How disappointing for them!

..so, they made IE accept using () to select elements from a list. I have no idea why, though one can always note that this is one of the minor details that can make a page "IE-only" without even the webmaster intending to exclude others. I'm not fond of conspiracy theories but "embrace and extend" might be a familiar phrase to some of my readers.

Nationwide writes:

if (objList.options(objList.selectedIndex).value != "")

The inner set of () should have been [] because they deal with the list of options in the selection element. (FireFox doesn't handle this either and gets a different script.)

There you go – a sinning Saint. A former typo turned into an embrace-and-extend weapon. Let's hope for a remorseful edit..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s