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.
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. 🙂
Recently in a project I’ve been working on, I stumbled across something that I haven’t seen before: one AJAX call was possible to make in the web page, but after that it stopped working.
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.
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!
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.
Something that always seem to raise a lot of opinion is how to reply to e-mail messages; or, to be more specific, where you write your reply in the context. I thought I’d explain my take on it.
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.
In the times we live in, it’s a fact that a lot of people download music and movies from the web through P2P or BitTorrent. The music and movie industries naturally see this as a threat and try to stifle it, but it seems these attempts are in vain.
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.
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:
As you might be aware of, I’m a great fan of rock and heavy metal. I used to play guitar in a band when I was young(er), and I just love going to concerts and getting my kicks! Therefore, when the show Rock Star Supernova was shown on Swedish TV, I was an avid fan.
From my own experiences, and based on what I’ve heard from friends, I start to wonder if web conferences as we see them now will lose their charm and become extinct, or at least more rare. Personally, I can’t motivate the cost of attending them to myself, since I feel that you don’t learn enough.
I’m constantly baffled why most companies and web developers don’t understand, or care about, the importance of using good semantic URLs. Therefore, I though I’d outline some reasons to help you understand why you really should care.
When done properly and in a serious manner, SEO is truly a fascinating field! However, I have some wonderings about how Google and other search engines treat and index certain things.
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?
One of the web sites I’m currently working on has a lot of line dividers, and they had been added somewhat inconsistently. Therefore, I decided to go the semantic route and throw out all div and p elements, and replace them with one single class-free hr. Oh man, did I open up a can of worms…
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.
With the advent and following mass adoption of Internet Explorer 7, I’ve been pondering what web browsers to ensure support in, and which one to finally ditch. I’ll explain my choices below, but while reading the post, something like TheCounter’s Browser Stats for February 2007 can be a good reference point.
Yes, people, it’s time again: get ‘yer geek on! March 29th we will have yet another Geek Meet with nice people, beer for our throats and pizza for our overworked bodies!
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.
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.
When developing web sites, we naturally want to offer our end users the option to freely resize the text size in their web browser of choice to their liking. What I would like to do here is present what I’ve found to be most consistent way to achieve this with CSS.
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.
For the third year in a row now, I’ve watched the five movies nominated in the Best Motion Picture of the Year category for the Oscars before the ceremony, to predict the winner. I thought I’d share my opinions about them and my guess about which movie will win.
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.
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:
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.
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.
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!
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).
For a time now, I’ve wanted to read an advanced book about JavaScript, to perhaps fill in the blanks, and to get some inspiration and different perspective on how to implement various features.
Ever been in the situation where you want to put some HTML on top of Flash movie? You’ve cursed the designers for using Flash, and stated that it is impossible? If that’s the case, I’ll advise you to reconsider.
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. 🙂
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.
Some people like to proclaim that the so-called web standards war, i.e. a wide-spread usage of web standards, is over. Let me take a couple of web sites as example why I don’t agree:
Firefox, The Little Memory Hog lived happily together with his family, the Mozillas, in a land far far away. Firefox had now turned 2.0.0.1 and it was time to attend kindergarten.
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.
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.
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:
Once every now and then you come across code that is so ghastly, so terrible, that it almost makes you go blind! While fighting the pain, you (think) you can be almost sure of one thing: this must have been done on purpose!
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:
Last night we had yet another Geek Meet, Geek Meet January 2007, in Stockholm, and a staggering 40 people showed up! I’m really happy that people keep coming back as well as new ones getting interested and showing up.
As you might now, yesterday Macworld Conference & Expo 2007 started with his keynote address. I thought I’d cover the new products, my opinion about them and the Apple hype.
In November last year, Aleksandar Vacić wrote his post Insert HTML page into another HTML page (found through No more iframes?). Basically, what it is about is finding a way to use an object element instead of an iframe to get the correct behavior in Internet Explorer.
Right about now, I guess your questions are why, how and is it necessary?