JavaScript


Thursday, September 8th, 2005

Niceforms: Pretty up your web forms

Category: CSS, Examples, JavaScript, UI

Web forms. Everybody knows web forms. Each day we have to fill in some information in a web form, be it a simple login to your webmail application, an online purchase or signing up for a website. They are the basic (and pretty much the only) way of gathering information on the web. You basically Read the rest…

Posted by Dion Almaer at 2:29 pm
7 Comments

++++-
4.2 rating from 30 votes

Showcase: Pick’Em Game

Category: JavaScript, Ruby, Showcase

John Carlin has created an ajaxian Football Pick’Em Game. It is a nice example of how Ajax can encapsulate your small application in one page. You simply pick the teams, and drag and drop them around! The game was built with Ruby on Rails and Scriptaculous.

Posted by Dion Almaer at 10:07 am
Comment here

+++--
3.2 rating from 6 votes

Simple Ajax with MochiKit and JSON

Category: Articles, JavaScript, Library

Andrew Gross has written part one of a series of tutorials on using the MochiKit JavaScript framework to write Ajax web applications. The article goes into creating the beginnings of a Blog system: function BlogPost(info) { bindMethods(this); this.info = info; } BlogPost.prototype.makeDiv = function() { return DIV({‘class’ : ‘blogpost’}, H2(null, this.info.title), HR(), SPAN(null, this.info.content), BR(), Read the rest…

Posted by Dion Almaer at 12:00 am
Comment here

+++--
3.2 rating from 6 votes

Wednesday, September 7th, 2005

SuggestBox: Free Ajax Component

Category: Component, JavaScript

Giorgio Braga has just released SuggestBox, a freeware AJAX component that can give to any web page the power of Google Suggest referred to own database tables. How to use it Add span tags with a SUGGEST attribute (e.g. <SPAN SUGGEST ID=”author”></SPAN>) Add the JavaScript libraries ( <SCRIPT LANGUAGE=”javascript” SRC=”SBinfo.js”></SCRIPT> <SCRIPT LANGUAGE=”javascript” SRC=”SBcode.js”></SCRIPT>) On the Read the rest…

Posted by Dion Almaer at 6:45 pm
2 Comments

+++--
3.8 rating from 13 votes

Friday, August 19th, 2005

Dojo Event System Explained

Category: Articles, Dojo, JavaScript, Toolkit

Ok, we admit it. This ajaxian community loves Dojo. True JavaScript professionals. So, it is nice to see the recent set of information coming out from them. This time, they discuss the Dojo event system (dojo.event.*) Unlike the DOM events that web programmers normally associate with the word “event”, Dojo takes a broad view of Read the rest…

Posted by Dion Almaer at 6:49 pm
2 Comments

+++--
3 rating from 5 votes

Thursday, August 18th, 2005

Continuous Integration with JavaScript

Category: JavaScript

It was obvious that Mr. Damage Control would come up with nice continous integration with JavaScript. Jon ended up with: desc “Runs all the JavaScript unit tests and collects the results” JavaScriptTestTask.new(:unittest) do |t| t.mount(“/lib”) t.mount(“/src”) t.mount(“/test”) t.run(“/test/unit/unittest_test.html”) t.run(“/test/unit/ajax_inplaceeditor_test.html”) t.run(“/test/unit/string_test.html”) t.run(“/test/unit/builder_test.html”) t.browser(:safari) t.browser(:firefox) end Can’t wait to see it out in the wild.

Posted by Dion Almaer at 10:37 am
Comment here

+++--
3 rating from 5 votes

Tuesday, August 9th, 2005

JavaScript Gotcha

Category: JavaScript

Keith ran into one of the classic JavaScript Gotchas wrt closures and sharing function objects resulting from: Browser independant code *may not* rely on obtaining a different, unjoined function object for *any* function declared inside another function, whether this be because of function declaration or expression within a loop, across calls to the containing function, Read the rest…

Posted by Dion Almaer at 11:54 am
1 Comment

+++--
3 rating from 5 votes

Thursday, July 14th, 2005

DWR and asynchronous ordering: DWREngine.setOrdered(true)

Category: JavaScript

Joe Walker (of DWR) has replied to the various comments on the A in Ajax. Joe shows how simple it is to not get burned in DWR: The secret sauce is DWREngine.setOrdered(true). Which does what it says on the tin – makes sure that we don’t dispatch a new Ajax call until the last one Read the rest…

Posted by Dion Almaer at 12:31 pm
Comment here

+++--
3.5 rating from 14 votes

Tuesday, July 12th, 2005

JavaScript Benchmarking

Category: JavaScript

As we get more and more interest in Ajax, and more of the web app runs via the JavaScript engine in the browsers, people are trying to see how they can perform. One recent benchmark discusses the performance of XSLT in IE, Firefox, and compares it to native JavaScript approaches. Conclusion So for the best Read the rest…

Posted by Dion Almaer at 10:41 am
Comment here

+++--
3 rating from 6 votes

Thursday, June 30th, 2005

Code: Try.these(func1, func2, func3)

Category: JavaScript

In the “cool JavaScript snippets” department, we delve into the Prototype library for a nice function which tries to fire and forget through a set of operations. Defining Try.these var Try = { these: function() { var returnValue; for (var i = 0; i < arguments.length; i++) { var lambda = arguments[i]; try { returnValue Read the rest…

Posted by Dion Almaer at 2:42 pm
2 Comments

++++-
4.2 rating from 12 votes

Wednesday, June 29th, 2005

Using CSS selectors to apply Javascript functionality

Category: Articles, JavaScript, Usability

Ben Nolan has written a nice piece called Using CSS selectors to apply Javascript functionality. He looks at Ajaxian showcases, and doesn’t always like the code that is mixed in the HTML. He goes on to explain how to use CSS selectors to abstract this code out, giving you the other benefit of a clean Read the rest…

Posted by Dion Almaer at 3:25 pm
6 Comments

++++-
4.2 rating from 10 votes

Tuesday, June 28th, 2005

Prototype and DWR: function $()

Category: JavaScript, Prototype

You may have seen $(‘someId’) in some of the JavaScript frameworks out there such as Prototype and DWR. We have had people wonder what kind of magic that is, and it is just a function. The name of that function just happens to be ‘$’, which is totally valid in JS. Prototype, being nice and Read the rest…

Posted by Dion Almaer at 11:41 am
10 Comments

+++--
3.9 rating from 20 votes

Monday, June 27th, 2005

Grokking Prototype-based OO in JavaScript

Category: JavaScript

“JavaScript doesn’t seem very OO”. I hear that a lot. How far from the truth it is though. A lot of us are just trained to think that OO == CLASS BASED OO, which has won out in a lot of popular OO languages of late. JavaScript is fully OO, and arguably more so than Read the rest…

Posted by Dion Almaer at 11:25 am
5 Comments

+++--
3.2 rating from 15 votes

Thursday, June 23rd, 2005

Google AJAXSLT: Google opens up JavaScript code

Category: JavaScript, Library

The land of Google Code has released a little library used in their Ajaxian applications (such as Google Maps and Suggest). The first piece released is Google AJAXSLT. AJAXSLT is an implementation of XSL-T in JavaScript, intended for use in fat web pages, which are nowadays referred to as AJAX applications. Because XSL-T uses XPath, Read the rest…

Posted by Dion Almaer at 10:53 am
2 Comments

+++--
3.6 rating from 10 votes

script.aculo.us: JavaScript Libraries

Category: JavaScript, Library, Prototype, Ruby

Thomas Fuchs has given birth to: script.aculo.us. (Note to self. Must. Kill. .us domains that make words). script.aculo.us provides you with easy-to-use, compatible and, ultimately, totally cool JavaScript libraries to make your web sites and web applications fly, Web 2.0 style. script.aculo.us builds on Prototype, and gives you interesting items such as: Visual Effects: The Read the rest…

Posted by Dion Almaer at 12:33 am
2 Comments

++++-
4 rating from 7 votes

Wednesday, June 22nd, 2005

Anonymous Classes in JavaScript and the XMLHttpRequest API

Category: Articles, JavaScript, XmlHttpRequest

Todd Ditchendorf has written up his thoughts on JavaScript, and API usage. He discusses the XmlHttpRequest API, and some of its ugliness, and gets into the way popular wrappers of the API work a la: var client = new BetterHttpClientAPI(); client.addListener({ id: 123, responseReceived: function (evt) { …. }, otherHelperMethod: function() { …. } }); Read the rest…

Posted by Dion Almaer at 9:35 am
4 Comments

+++--
3.3 rating from 12 votes