Partial XMLHttpRequest responses?

We all know how to make an AJAX request, and fetch some data. But as soon as you need to fetch data incrementally, have the server push data to you, you have to resort to all sorts of complicated stuff. Websockets; with all their different versions and shady support, different kinds of polling, hidden iframes,…

Read more...

Geolocation and Google maps

Google Maps has has geolocation support for a long time, but I still find people surprised of how it all works. So here’s a short writeup, skip it if you already know all about geolocation. Lets start at the Google Maps frontpage. Among the zoom controls, above the little old man, there’s a button in…

Read more...

Animate from one element to another (jQuery plugin)

Have you even tried clicking an “Add to cart”-button and not understood what happened? I have. An although I understand the idea of adding a product to the cart, and then letting the user continue browsing from where he is, I still get stumped when “nothing happens” when I click the button. So what to…

Read more...

Lazy Loading Asyncronous Javascript

Update: This is no longer the best way to load scripts. Use a script tag with async and defer set instead. Like many of you might know, I’m working on a site called Kundo with a couple of friends. It’s kinda like a Swedish version of Getsatisfaction, which means we have a javascript snippet that…

Read more...

Rendering a web page – step by step

Have you ever thought about what happens when you surf the web? It’s not as simple as it seems: You type an URL into address bar in your preferred browser. The browser parses the URL to find the protocol, host, port, and path. It forms a HTTP request (that was most likely the protocol) To…

Read more...

Make a div clickable

We all dislike that links are so small, and hard to click. So of course we want to make the clickable areas bigger. Some would think that doing this with some CSS on the a-tag would be a good way, but then you can’t have block level elements inside it (you’ll get a validation error…

Read more...

Interface developers and security

You live in a new era, when demanding that people register on your site is no longer enough. There’s far too many other sites out that that you’re already a member of, you don’t need another one. You need to trust people. You also want people to contribute to your sites with content somehow. Text…

Read more...

Worth a look: DOMAssistant

A couple of months ago Robert Nyman showed me a javascript library he had built, DOMAssistant, and proceeded to use it successfully in one of our projects. I wasn’t amused. How could a tiny homebuilt little hack compete with my favorite, the almighty jQuery? I whined, and said I really liked the CSS-selector syntax that…

Read more...

Sharepoint 2007 from an interface developer’s view

Like Cameron Moll (Skinning Sharepoint and Pointedly unskinnable), I’ve been working with Sharepoint 2007 (aka MOSS) recently, and I hope you don’t mind me posting a few articles about my work here. I’ve found far too few blog posts that really go to the depth in explaining how things really work. I’ll try to do…

Read more...

Manipulating innerHTML removes events

Others have written about this before, but I thought I’d mention it again, just so you don’t miss it. Aleksandar Vaci? found it while playing with tables and their cells. I found it when Robert and I played with nested lists. It works the same across browers. Let me show a quick example: You have…

Read more...

I’m an interface developer

In his latest post Roger Johansson asks the question Are we designers or developers?. I have a simple answer for that. None of them. Let me explain: First we have these people calling themselves developers. And boy do they know programming… and math… and… no that’s all. Many have a masters degree in computer science,…

Read more...

What is Web 2.0? Really.

Web 2.0 is really hot right now. One of Sweden’s biggest newspapers recently wrote a long article on their debate section. They had started linking back to blogs that linked to them, in a little box next to the article. The problem was that they had got into trouble with what blogs to link to….

Read more...

Improving interactivity with Javascript

Push buttons, radio buttons, check boxes, select boxes, and text inputs. That’s the controls HTML allows us to use to interact with our users. A small dedicated group of people at the office (I work at Valtech) sat down and listed all controls we could think of. The list below is basically that list, completed…

Read more...

Flash-only vs. AJAX sites

Even though web developers like me have discouraged from building Flash-only sites for as long as I remember, they are popping up all over the place. For no reason! We are ready to make the leap to standards. And our weapon with be AJAX. What kind of sites are built with only Flash? Let’s start…

Read more...

Web development blogs you should read

The web is filled with blogs about web development. I’m always looking for good blogs to add to my feed reader and I thought some of you might do that too. So let me list the webdev blogs I subscribe to right now (in alphabetic order): 456 Berea St – Roger Johansson is one of…

Read more...

How web standards feels

When talking about web standards many of us have started using marketing terms. Every day we hear about the bandwidth savings, the increased user base that are able to access your site, how well it affects SEO and so on. But none of that was what got me into all this. Let me tell you…

Read more...

Concept: Four layers of web development

When thinking about web development on the client side, I tend to think of four different layers. Any (well built) framework will cater for all of these layers and all good developers will be aware of them. The layers I’m thinking about are: Data, Structure, Design, and Behavior. This article discusses all four of those…

Read more...

Challenge: What’s the worst you can do?

After reading through the comments on my levels of CSS article I find that I few people seem to think that the article is a way to ridicule beginners. It’s not. It’s a way to document the steps that I think I have climbed. Some people also thought that this set of levels is a…

Read more...

Extra fluid layouts with javascript

I’m a big fan of vector graphics. Because of that I love Macromedia Fireworks and the way it handles all elements like vectors. The good thing about that is that they can be resized and zoomed without them losing their sharpness. This got me thinking about how to add some vectorization to CSS layouts. My…

Read more...

Line breaks with javascript

Over the years there have been numerous suggestions of different ways of doing line breaks on the web. Browser incompatibilities, lack of support for standardized features, and the creation of browser specific features all helps in making it incredibly difficult. Searching and reading for a while quickly brought me to think the best current solution…

Read more...