Entries for month: June 2008

Use Idioms To Make Your Intentions More Concise

Javascript 4 Comments »

To "===" or not to "=="

About 6 months ago, I came across an online tool called JSLint. It's a JavaScript program that looks for problems in JavaScript code. I began using it to check most of my scripts to see if I had any errors in them (I know, I know... you thought I was perfect). Well as it turns out, I had a lot of little mistakes, like using a function or object before it was defined or little formating issues. But one error I kept receiving made no sense to me and I honestly didn't understand why I was getting it.

Expected '===' and instead saw '=='.
Expected '!==' and instead saw '!='.

Granted, it wasn't like I didn't understand how to fix the issue, but JSLint wasn't very forthcoming on why I needed to make these changes. So, without fully understanding what was going on, I began using "===" and "!==" whenever I needed to make a logical comparision. And I've been doing this for the past 6 months, without a clue as to "why".

Read more...

A Nice Book On Learning JavaScript

Javascript No Comments »

Beginning Javascript with DOM Scripting and AJAX

In my lifetime I can honestly say that I have only bought two books on JavaScript programming. The first one was called "Special Edition: Using JavaScript" [Que-1996]. This was basically a reference book that described, and provided an example of, every function and method in JavaScript at that time.ᅠI don't think I have opened this book in about 8 years.

During this time, I have relied heavily on Google to provide information on any new tips and tricks that have come out. If I came across something that intrigued me, I would spend countless hours learning all I could from the internet.

Read more...

Problem Using OnFocus and OnBlur Events with FireFox 2.x

Javascript No Comments »

FormFieldinator's Dirty Little Secret

Brian comments on FormFieldinator:

...I tried the [FormFieldinator] tester and found some problems (http://www.cjboco.com/projects/FormFieldinator/). I'm using Firefox 2.0.0.14:

...I get an error message when I tab after pasting invalid text, but it moves to the next field anyway. Shouldn't it stay in that field until it's correct?

I have to admit, I was wondering when someone was going to call me out on this. If your not familiar with FormFieldinator, it was my attempt to create the ultimate JavaScript form and formfield utility library. I developed, what I thought, was a fairly robust set of tools to allow you to capture, validate and format form input. Heck, I even came up with a cool name.

Read more...

A Nice Find, Animator.js

Javascript No Comments »

It's Like script.aculo.us and moo.fx, but Half the Calories

Right before I left on my vacation I came across a very nice JavaScript Animation class called Animator.js. In the past, I've switched between using script.aculo.us and moo.fx for various projects, but at times it seemed I would run into problems. Their frameworks sometimes interfere with the latest version of prototype.js, or they were overkill for whatever task I was trying to perform. I think that's why I kind of like Animator.js. It's a self contained class that allows you to perform various animation task. It's lightweight and extremely easy to implement.

I recommend checking out the authors site [BernieCode] to find out more and also, I've created a little demo that duplicates one of WebKit's new CSS animations. Check it out and let me know what you think.

Note: It wasn't really explained on Bernie's website, but you need to return window[Animator][Control Function] after you call new Animator() to get the animation to work.

Update, openWYSIWYG Is Now Working With Safari

Javascript 2 Comments »

I fixed the bugs, now what?

Well, I'm back, relaxed and dove straight into working on the Safari fix for openWYSIWYG. I figured out the issue when attempting to insert a new TABLE into a blank editor window. That little bug has been squashed. You can grab the the Safari version by visiting this blog entry.

So, what next? Well, that's a darn good question. I still think this editor needs some improvements to make it more cross-browser friendly, make improvements on the some of the core functions (especially some of the node functions), improve how it handles the HTML code and a few other things that I think it needs help on.

Read more...

Powered by Mango Blog. Designed by Creative Juices Bo. Co. USA.
RSS Feeds