Posts By:

2009 category Tags 1 Comment

Safari and window.open – How to do it

There is still some traffic coming in from people who are searching for how to deal with the safari popup blocker. So I thought it might be nice to also tell what you can do about it – as most people want solutions, not backgrounds…

So, here you go:

It’s pretty simple, really. What to do? Well, call window.open() while the popup blocker still allows it, and store a reference to the window object. Then, later, do with it what you want. That is, changing the location in most cases.
read more »

dojox.analytics.Urchin for jQuery

Or: Still ending the ga.js wait…

It has become quiet here the last weeks – due to an awesome trip to Italy. Returning home, I decided to put Google Analytics on this page.

As I always hate waiting for the ga.js to load while visiting websites, I wanted a mechanism to delay the load of it. Why this is a good idea has been discussed often enough elsewhere, so we take it as fact. Peter Higgins once wrote such a wrapper for dojo, and as of dojo 1.3, it’s officially included in dojox (see Alex Russel’s post). But this WordPress theme runs jQuery, and I didn’t want to have two frameworks in one website – so I searched for something that did the job for jQuery.
read more »

Static data handling in PHP

Bild 17Every now and then I stumble upon PHP Code dealing with config files. Besides being happy that people use config files (uh, yes, it happens too often that people don’t…), I am often unhappy with how they’re dealing with config files. You can find the ugliest things out there, like arrays in .php files (my favorite). However, even if config files are used, there are strange things happening to them, like being read once and serialized into a constant.

So I want to share today a very primitive static data handler that I use for quite some time now, and wich has always served me well. By static, I mean data that doesn’t change during runtime, like smtp server connection data, database connection data and the likes.

read more »

2009 category Tags 2 Comments

3D Canvas Walker revisited

Screenshot

Screenshot

One of the things that fascinated me most about computers since I was a teen, was their ability to simulate a three-dimensional space where one could move around in.

That’s why I was so intrigued when I read Jacob Seidelin’s post about “Creating pseudo 3D Games“. I had to play around with it, as I wanted to have mouse control in it, but performance was so bad that it was impossible. So I laid aside that idea. Eventually, he continued this project and used it for something pretty awesome called “WolfenFlickr“, where you can walk around and look at Flickr photos, attached to walls. As I said, pretty awesome.

Anyway, what I wanted was mouse navigation and strafe keys, as you have it in shooters – this kind of moving around always gives me the feeling of being “free“ in a way. Experiencing that freedom in a web page (w/o flash, of course) was still on my mind.

read more »

2009 category Tags 2 Comments

Safari and window.open

Safari console screenshot

Safari console screenshot

Update: If you are interested in how to make window.open work you might want to also read the follow-up: Safari and window.open – How to do it

Working on a project these days, I noticed that the only call to window.open in that app did not work in Safari. Looking into it, I found that it was Safari’s popup blocker that wouldn’t let that call succeed.

Usually, I don’t deal with window.open, so that behaviour was new to me, and I asked Mr. Google what he knew on this. Not much, as it turned out out – I found only two interesting notes on it. One was pretty strange and I guess it was more about a Safari 3 beta not returning a window object. The other one proposed the the window.open call had to be within the same function body as the method handling the event. The comments on that post affirmed this suspicion, but I decided to look into it myself.

read more »