Posts in the "" Category

AJAX Suggestions – a new JavaScript library for you

Updated April 10th with a couple of features per comment suggestions

Ok, I’ve added a couple of features and settings based on the comments I’ve got. The additional settings are:

hideResultsOnDocumentClick
If a click on the document should hide the results list.
itemInsertValueSetFocusToInput
If the focus should be set to the input element, once an item has updated the input element’s value (by initially having the itemInsertValueIntoInputClassName CSS class).
hideResultsWhenInsertValueIsSelected
If the results list should be hidden when the input element’s value is updated.

Another additional feature is that if you use the arrow keys to navigate the results list, arrow up from the first item as well as arrow down from the last, will set the focus back to the input element.

Updated April 11th

Changed the license to a Creative Commons Deed.

Updated April 13th

I got an e-mail with the suggestion to turn off the web browser autocompletion feature of the input element. I think it was a good idea, so I have now added it as a setting:

turnAutoCompleteOff : true

When most people need some kind of intellectual challenge, they do crosswords, sudokus, IQ tests, read up on philosophy or something similar. Me? I write some JavaScript. 🙂

Continue reading

Like, redesign

It felt like it was time to spice this baby up, so I stayed up way too late Saturday evening (rather, Sunday morning), to put the finishing touches to my new design.

Continue reading

Geek Meet March 2007 summary

Last Thursday we had another Geek Meet, and as always these days, it was a fair amount of people showing up. This time, for the majority of the people present, it was actually their first Geek Meet. It’s great to see new faces, and the same time, I hope that the bunch of regulars who had to cancel this meeting will be back at the next one, providing to an even bigger group!

Continue reading

Stop resizing my web browser window!

One of my top annoyances when surfing around is when some “clever” web developer has chosen to use a script that resizes the web browser window to what they think suits their web site. Stop doing that! The size of my web browser window is the one I like, and I very much like to keep it that way.

Do you hate when this happens to? Please sign the petition (or, rather, write a comment) below, to state:

No, we don’t accept you resizing our web browser window anymore! You resize, and we’ll leave your web site forever.

Bob Dylan club gig in Stockholm

I will never see Bob Dylan live again. And, please, let me tell you why: last night me and my brother had the unique opportunity to see the legend in a club gig(!) in Stockholm! And, knowing I’ll never get such an experience again, there’s no need to take that risk.

Continue reading

Indentation of code

One thing that I’ve always taken for granted how to do is the indentation of code. Sure, people place characters like { either on the same line as the CSS rule/JavaScript function name, or on the following, and that’s just fine. But what I mean here is how to accomplish the actual indentation.

Continue reading

Why would anyone use Internet Explorer?

Don’t worry, this is not a post about Internet Explorer’s support (or lack thereof) of code support, but instead solely focused on the end user experience. I regularly try out a number of web browser, and I have one question:

Why would anyone use Internet Explorer?

Continue reading

Is invalid code created through JavaScript ok?

When developing web sites with heavy interactivity, your scripting skills are really put to the test. And, sooner or later, you will be put in a situation where it’s a fine line between following web standards and what’s best from a performance and structure perspective. One question that follows that is: is it ok to apply invalid attributes via script to elements?

Continue reading

Phasing out Microsoft products

When I got my first computer back in 1996, it was an IBM PC with Windows 95 on. Since then I got into web developing and I’m living a fairly computer-intense life (at least in the daytime), and I’ve realized more and more that I’m phasing out one Microsoft product after another from the software I’m using.

Continue reading

DOMAss renamed to DOMAssistant, with added Prototype/jQuery compatibility

After I released DOMAss, I’ve gotten a number of e-mails from people telling me how happy they are with it and how well it compares to other libraries. They only have one problem: the name. What they’re saying is that they can’t use such a name, albeit funny, in production for large web sites and in their customers’ code.

Happy to oblige, the library is now renamed, with added side-by-side compatibility for other JavaScript libraries such as Prototype and jQuery.

Continue reading

Would you want to know when you will die?

On and off throughout my life I have been contemplating if I want to know when I’m going to die. These thoughts resurfaced recently with the hanging of Saddam Hussein (where I think the death penalty was a travesty of justice; he should have lived and served his time) and every time I think about it I get all these horrible feelings of what it would actually be like to know.

Continue reading

A tech conversation…

When you’re a consultant, you once in a while get to overhear (alright, I’m constantly eavesdropping) some interesting conversations that amuses you. Today’s one: a technical one.

Continue reading

The wrong hole?

This is about a conversation I overheard many many years ago, taking place between a couple of teenage guys. It was about the “wrong hole”…

Continue reading

In search of a good H1

I’ve always liked semantics and to choose how to properly mark up content to convey the information the best way possible. But, and I know this might sound weird, as of lately, I’ve had a harder and harder time to find the suitable content for one specific element: the H1.

Continue reading

“The HTML guy”

I’ve recently started on a new assignment (which is mainly the reason that I haven’t been able to muster any extra strength to blog, besides from my family being sick…), and I’m hired as a subcontractor. This means that I’ve been introduced to a lot of people the last couple of days, and it has almost exclusively been with a term that I hate:

The HTML guy.

Continue reading

Dead celebrities

I find it quite remarkable that certain people’s death, persons you never knew or met, can affect you so much. This is especially true in the case of celebrities; not so much for what they’ve done, necessarily, but for what period in your own life they represent.

I though I’d name some people’s deaths that has touched me in different ways.

Continue reading

Windows Vista doesn’t rock my world

Windows Vista is now finally released, and Microsoft are banging on their marketing drum, blowing their PR horn. I had the chance to try out a release candidate of it and have also seen some of the final version. I have to be honest and say that I haven’t tested it too much, so my view probably isn’t as balanced as it should be (therefore I won’t cover deeper functionality).

But from what I’ve seen, frankly, I’m not impressed.

Continue reading

Work your way to a Trig invite

There’s something new and exciting on the web called Trig. I’m not really allowed to tell you anything more about it (although I want to! :-)), but the fact that I have some invites to share.

If communities are your thing, this is an opportunity that you definitely shouldn’t miss!

Continue reading

How to write valid HTML/XHTML code to include Flash

Updated May 27th 2008

An alternative suggested solution is using FlashReplace.

Hopefully, you’re someone who cares about web standards and wants to have valid code for the sake of web browsers’ rendering and for you as a web developer, to more easily spot errors right away. Then, when including Flash content in your web page, the default code output from various tools and web sites out there is invalid (at least when it comes to using them with a strict DOCTYPE, which I’d really recommend you to go with).

So, what should a poor caring web developer do?

Continue reading

DOMAss – The DOM assistant

Updated March 2nd 2007

DOMAss now has a new name, DOMAssistant, and it is also possible to run it side-by-side with other JavaScript libraries such as Prototype and jQuery. For more information, please read: DOMAss renamed to DOMAssistant, with added Prototype/jQuery compatibility.

Updated March 6th 2007

Per Zimmerman made me aware of the fact that I wasn’t as consistent when checking for names and whitespace in the addClass and removeClass as I am in the hasClass method, so this has been fixed to address any potential issues you might have had. Just download the DOMAssistantCSS JavaScript file and you should be good to go. 🙂

Updated April 11th 2007

Changed the license to a Creative Commons Deed.

Updated May 11th 2007

Minor fix for strange behavior in IE when using the addEvent method on the window object. For more information, please see DOMAssistant fix for addEvent method peculiarity in IE.

Updated July 11th 2007

PDF documentation added, kindly created by Michael Frühmann.

Updated September 20th 2007

DOMAssistant 2.0 released!

Updated October 4th 2007

The DOMAssistantCompressed JavaScript file has been updated. My compression approach was a little too effective for the special DOMReady fix for Internet Explorer, so necessary code for optimal performance was unfortunately removed. This has now been addressed, so please download the new version if you use the compressed file.

Updated October 19th 2007

The DOMAssistantCompressed JavaScript file is updated again. I noticed a problem with the elmsByAttribute method in IE where the compression resulted in a wrong reference, returning incorrect results. Download the new version and it will be fine.

When I released my EJ code, while I felt that it contained very useful functions, it didn’t feel properly packaged. Also, I’ve always wanted a proper base to stand on for various DOM interaction, so I didn’t have to start from scratch in every project.

So now, I proudly present DOMAss!

Continue reading

SEO gone overboard

The hunt for getting a good search engine ranking affects more and more companies. A higher ranking equals more visitors equals (most likely) more customers. More customers, in turn, equals more money, which is what business is about.

But sometimes, the hunt hurts the quality of a web site.

Continue reading

Tabbing problems in Firefox in Mac OS X

Recently I got a bug report from marketing (don’t all bug reports come from there? 😉 ), about an unexpected problem in Firefox in Mac OS X. The end users had problems tabbing through the web page, and especially through forms. Since I, at the time, sat on a PC, I couldn’t test with my settings, although I knew I hadn’t seen the problem on my Mac at home.

Continue reading

Should the br tag be used?

If you develop a web page nowadays, you don’t use br tags, right? Or do you? And if you do, is it wrong, or the most efficient and pragmatic way to implement a desired line break in some text?

Let’s take a look at this from a number of perspectives:

Continue reading

The cat and the dream

Ok, this might scare you a little, but I had the weirdest dream just before I woke up this morning. I (don’t?) hope that anyone of you are good at interpreting dreams, so here goes:

Continue reading