Tech Thought

Tech tips, hints, and general musings. PHP, Perl, Mysql, Javascript, AJAX, JSON, Linux, Mac OSX

Entries for March 6th, 2008

How-To: Speed up page loading – compressed prototype.js

To help speed up the load time of your prototype.js and scriptaculous pages, you can now download fully compressed versions of all the required files from the ‘prototype-core’ group on google thanks to John David-Dalton (original post on Ajaxian): http://groups.google.com/group/prototype-core This reduces the size of prototype and scriptaculous to 64k total! Be sure to read [...]

Leave a Comment

Javascript OO: Scope of ‘this’ variable when using prototype.js

If you write a fair bit of OO javascript and also utilise AJAX through one of the many frameworks (I personally use prototype.js most of the time) you may have come across the following issue: var myobj = new Object(); myobj.Methods = { result: 0, callAjax: function() { new Ajax.Request(‘ajax.php’, { onComplete: function(transport) { this.result [...]

Comments (2)