gasman
@gasman
Best posts made by gasman
Latest posts made by gasman
-
RE: Youtube UK wtf take 2
Talking of Youtube language settings, have they fixed the bug where they send you email notifications of new comments on your videos in the language that the commenter was using at the time?
-
RE: Marketing Vomit (from internal email)
@ActionMan said:
there are too many and too numerous individuals to thank for this outcome.
Too many *and* too numerous? Wow! If only they were abundant, copious and plentiful as well, then there would be a lot of them!
-
Cisco websie WF
Something slightly odd happening on http://cisco.com/ right now...
-
RE: IE7 select boxes: powered by fairy dust
Ah, no... document.createElement('option') has an entirely different bizarre bug. I forget exactly what it is - it's been erased from my memory and replaced with a post-it note saying "Don't use this. Ever. Use 'new Option' instead."
-
IE7 select boxes: powered by fairy dust
Consider the following Javascript code for dynamically creating a select box populated with a set of options, and selecting one of them:
<html>
<head>
<script type="text/javascript">
function go() {
optionNames = ['false', 'true', 'file_not_found']
var selectBox = document.createElement('select');
optionsByName = {}
for (var i = 0; i < optionNames.length; i++) {
selectBox.options[i] = new Option(optionNames[i], i);
optionsByName[optionNames[i]] = selectBox.options[i];
}
document.getElementById('form').appendChild(selectBox);
selectBox.selectedIndex; /* add magic */
selectBox.selectedIndex = optionsByName['true'].index;
}
</script>
</head>
<body onload="go()">
<form id="form">
</form>
</body>
</html>A foolish programmer might see the /* add magic */ line, realise that it does the equivalent of "hello, this is a nice select box isn't it? Just saying.", and try to take it out. This would be a mistake, because that line is required for IE7 - otherwise it leaves the select box blank. Never mind that the select box doesn't actually have a blank option, that's just part of the magic. Obviously select boxes just take a while to warm up, or something.
It's not the only way to supply magic, though. You can stick alert('brillant') in there instead, and that'll work nicely.
-
Brother, can you spare a dinosaur?
In the UK, there's a TV channel 'ITV Play' devoted entirely to premium-rate phone-in gameshows. During quiet times, like Sunday mornings, they put on games and quizzes to play by text message, which is clearly a nice moneyspinner for the TV station - it's all automated, no need for a presenter to answer the phones, and no running costs at all. I didn't realise just quite how cheap it was, though, until this question popped up this morning:
Q. ITV have spent
- A) UFOs
- B) The solar system
- C) Dinosaurs
After a pause of a few seconds, it merrily revealed the answer to be "Dinosaurs".
It took me a moment to realise what had happened... the question must have been something like "ITV have spent £1.3m on a ground-breaking new documentary on what subject?", but their software fell over as soon as it encountered a non-ASCII character. Oh well, there can't have been more than a couple of thousand people paying attention at the time...
- A) UFOs