Jon Tan shows how to get @font-face to work on IE

If you\’ve designed a website or built one based off of a designer\’s vision, you\’ll understand the frustration when they don\’t want to use a common font and you have to explain why they should. There are a bunch of options of course, like sIFR and CSS image replacement. sIFR requires Flash and javascript, while CSS image replacement basically hides the text while an image with the text is placed in the background. Then there\’s the CSS @font-face construct which allows you to use an actual font file. There are two different implementations used between IE and the other popular browsers, and a whole mess about using licensed fonts. Jon Tan informs us by giving a brief background about using licensed fonts and clarifying how to use @font-face in IE. Be warned though; the implementation of using @font-face in IE requires IE conditional comments.

Thank you Jon, for such a great in-depth article. Really nice work.

What I Learned About Multi-threading in JavaScript

There\’s no such thing. Correct me if I\’m wrong, but multi-threading in javascript does not exist. But we can simulate it, as is discussed by James Edwards. How does it work?

It all hinges on the use of asynchronous timers. When we run repetitive code inside an asynchronous timer, we’re giving the browser’s script interpreter time to process each iteration.

Continue reading What I Learned About Multi-threading in JavaScript

MooTools.Floor Does Form Validation Right!

We\’ve all dealt with form validation one way or another and I didn\’t find one to my liking. I was mulling over the idea of writing my own for a while and then I read Ajaxian\’s blog today about a really awesome MooTools form validation class from MooTools.Floor. MooTools.Floor actually announced their FormCheck v1.4 form validation class in July 25, 2008. Continue reading MooTools.Floor Does Form Validation Right!

Ready for display:table? I think not.

Rachel Andrew wrote an article about the CSS display property to include a few new tricks in IE8.

When released, Internet Explorer 8 will support many new values for the CSS display property, including the table-related values: table, table-row, and table-cell—and it’s the last major browser to come on board with this support. This event will mark the end of complex CSS layout techniques, and will be the final nail in the coffin of using HTML tables for layout. Finally, producing table-like grid layouts using CSS will be quick and easy.

I agree this is great news, and her examples leaves me drooling at its potential, but we need to remember that majority of users, in our vast web, is still using IE6/IE7, which lacks support that IE8 will gain. Continue reading Ready for display:table? I think not.

Moo-Comet aka MooTools Request.Comet

Ever heard of Comet? I heard it long ago when it just started out in Ajaxian\’s post. They described it best:

Alex Russell has coined a term for a flavour of Ajax that’s been getting more attention of late. Comet describes applications where the server keeps pushing – or streaming – data to the client, instead of having the browser keep polling the server for fresh content.

Correct me if I\’m wrong but I think the Dojo framework may have been the first to support Comet. Some of the uses I know of is chat and stock ticker updates but I\’m sure there are tons of uses.

Now, when I learned about Comet, I was using MooTools 1.0/1.11. I was really interested in trying out this new tech and was trying to learn as much as I could. I knew that MooTools didn\’t have a Request.Comet so I looked into building one. Long story short, I wasn\’t successful because other projects took up my time, but my curiosity never went away.

Doing a search for Moo-Comet has led me to Benjamin Hutchins and his Request.Comet example. He has a MooTools 1.2 and 1.1 version of Request.Comet.

His code us up on Google Code for all the world to see. Great job, Ben! I can call you Ben, right?

MooTools Delete Key

David Walsh has kept us informed in his post about the delete key event.

To detect the delete key, this does not work because \’delete\’ is a reserved word in javascript:

var isdel = Event.Keys.delete;

So here is the proper way:

var isdel = Event.Keys[\'delete\'];

He put it best:

As flexible as Moo’s language is, you can’t get around the reserved words!

Great job on keeping the MooTools community well informed, David!

MooTools 1.2.1 hits the web!

If you haven\’t found out already, MooTools 1.2.1 is now available. The MooTools dev team has stated that it won\’t break any of your MooTools 1.2 code! It\’s also working with Safari 2 again. Congratulations to the team for a job well done!

You can check out the changelog for a list of changes.

Go and update your copy.

Now with 1.2.1 out, the dev team will be working on 1.2.2 and 1.3. You can get all the info straight from the horses.. err.. cows.. mouth, you know what I mean.

Bezier Class in MooTools

Iván Paz (correct me if I\’m wrong, not sure that is the correct surname) has put together a really awesome MooTools class that extends Fx.Morph with bezier calculations used in translations.

You can check out his site here: Ivanicus\’ Code Box

He\’s got an example set up too! But beware, it\’s currently a work-in-progress, as he stated.