A-void(0) javascript:void(0)

Posted September 14th, 2009 in javascript by Michael

Today seems to be the day of IE6 bugs… the rather old “comma-bug” caused some troubles in one app and another one did not work properly in IE6. The following code was involved:

<a href=”javascript:void(0)” onclick=”someFunc()”>my link</a>

The someFunc() dynamically loaded a new script file – which worked fine in all browsers except for Internet Explorer 6 – the file was never loaded. Reason for this is that javascript:void(0) terminates all loading, including newly added &ltscript> tags or XHR requests.

Solving this is quite simple – the default handler of the link must never be executed:

<a href=”javascript:void(0)” onclick=”someFunc(); return false;“>my link</a>

But because there are more issues around the javascript: pseudo protocol I highly recommend not using javascript:void(0) at all. Instead use the following code:

<a href=”#” onclick=”someFunc(); return false;“>my link</a>

In the worst case the default handler is executed, which means the site goes to an empty anchor… in practice this means the “#” is appended to the URL, that’s it. No scary JavaScript function involved, that only breaks IE6. And shorter to type too.

More information: here and here.

OSX WPA2 Enterprise woes

Posted September 11th, 2009 in iphone by Michael

I use one WLAN very frequently that uses WPA2 Enterprise for authentication; this also means that the certificate used for authorization has to be renewed every year. Getting the new certificate is not really that much of an issue, but renewing it was really hard this time….

In OSX 10.5 the certificate has to be imported into Keychain Access, which worked as expected. But for some reason the certificate was not used for authentication, the dialog for WPA2 Enterprise networks always defaulted back to the 1Password certificate. The first in list. Which obviously failed.
It took me a while to figure out where exactly the certificate has to be chosen in the Network Preferences pane – in a dialog that is very well hidden:

The iPhone was even worse – importing the certificate (and creating a new profile with it) was not a big deal. But again, only the first, old, expired certificate was used. Nothing easier then that, just remove the profile. Interestingly the certificate was still there in the “add WLAN” dialog. Removed the newly imported certificate – the old one is still there. Reset network settings – the certificate is still there. WTF?!?!
What finally worked was installing the old, expired certificate and then removing it again, without installing the new one. This removed the profile *and* the certificate from the phone. Then installing and using the new certificate was simple and worked as usual.
My guess is that the two profiles/certificates with the same name somehow confused the iPhone – so the process is to remove the old certificate before adding the new one.

While I hope this blog post helps others when they have to exchange their WPA2 Enterprise Certificate it will definitely help me next year on August 28th when I have renew mine again :)

Apricot

Posted September 10th, 2009 in fun by Michael

Wieso erinnert mich das an das Haus von guten Freunden von uns?

sandy: Schaaatz?
kenny: jopp?
sandy: Was hältst du davon wenn ich mein neues Zimmer in nem Pfirsichton streiche?
kenny: in einem was-ton?
sandy: pfirsich
kenny: also pass auf ich erklär dir jetz mal was Männer können NUR 16 Farben sehen. Das ist wie bei Windows im abgesicherten Modus. Pfirsich, zum Beispiel, ist eine Frucht und keine Farbe.

(Via german-bash.org, Foto von flickr)

2 Jahre Shaolin Tempel Graz

Posted September 9th, 2009 in kungfu by Michael


Der Shaolin Tempel Graz feiert am 28. September seinen 2. Geburtstag! Wer mit dem Shaolin Kung Fu Training liebäugelt sollte diesen Termin nutzen, es gibt eine Spitzen-Performance sowie Gelegenheit ein wenig Tempel-Luft zu schnuppern und sich zu informieren. Und danach? Ab zum Probetraining!

Amitabha!