Tuesday, October 30, 2007
Cross site Ajax plugin for Prototype
You can implement this by simply setting crossSite: true as a config parameter to Ajax.Request.
Code example:
new Ajax.Request('myurl', {
method: 'GET',
crossSite: true,
parameters: Form.serialize(obj),
onLoading: function() {
//things to do at the start
},
onSuccess: function(transport) {
//things to do when everything goes well
},
onFailure: function(transport) {
//things to do when we encounter a failure
}
});
the full information can be found on Thierry Schellenbach blog.
Tuesday, August 7, 2007
JavaScript Image effect library
You can take a peek:
http://www.netzgesta.de/corner/
Sunday, June 24, 2007
DP_Debug JavaScript Debugging Extensions
In addition the library allows for simple access to Query String and Cookie values and provides basic logging, code timing support and program integration support.
Full information can be found:
http://www.depressedpress.com/Content/Development/JavaScript/Extensions/DP_DeBug/
:-)
Saturday, April 14, 2007
Prototype Library that helps store JSON data in cookies
The nice library is built on top of Prototype and gives you a simple API to put and get JSON values into cookies.
Full information and download:
Yummy JSON Cookies (using Prototype)
Code Example:
var jar = new CookieJar({
expires:3600, // seconds
path: '/'
});
var dog = {name: 'Jacky', breed: 'Alsatian', age:5};
jar.put('mydog', dog);
mydog = jar.get('mydog');
alert("My dog's name is " + mydog.name);
alert("He is " + mydog.age + " years old");
alert("He is an " + mydog.breed);
Enjoy :-)
Monday, March 19, 2007
CSS+Javascript Fancy menu
devthought.com
I found it when I was surfing and looking for cool javascript and CSS stuff.
Sunday, March 11, 2007
Compressed versions of Prototype
1.4, 1.5rc0, 1.5rc1, 1.5 final.
His package can be download from:
Compressed prototype
He managed to get it down to 14.4kb.
Wednesday, March 7, 2007
ASP.NET JavaScript IntelliSense
1) Proactive Completion List: No more waiting for ‘.’
2) Keywords in Completion List: fun your way to function
3) ASP.NET AJAX Concepts in Completion List: Direct support for Atlas
4) IntelliSense from Script Libraries for ASPX Pages: Now you can see objects that exist in other external script files.
This comes along with the release of an updated Ajax Control Toolkit.
more information:
blogs.msdn.com
Sunday, February 18, 2007
JavaScript Performance Validator
There is great "JavaScript Performance Validator" tool that provides automatic source code performance analysis (profiling) of applications as they run.
Currently the tool works with Mozilla Firefox 1.0.6, Mozilla Firefox 1.5 and Flock 0.7. At present they cannot support Internet Explorer, although they want to support Internet Explorer.
More information can be found on the company (software verify) web site:
JavaScript Performance Validator
Even if you work with Internet Explorer and your application can also run with Mozilla this tool can help you, because often the performance problems are the same in both browsers.
Thursday, December 14, 2006
moo.fx javascript effects library for prototype.js or mootools framework.
It's very easy to use, blazing fast, cross-browser, standards compliant, provides controls to modify any CSS property of any HTML element, including colors, with builtin checks that won't let a user break the effect with multiple, crazy clicks. Optimized to make you write the lesser code possible, the new moo.fx is so modular you can create any kind of effect with it.
more information on moo.fx:
http://moofx.mad4milk.net/
Thursday, December 7, 2006
Prototype Event Extension: Event.wheel(e)
The demo shows this in action.
The Code:
/*
* Orginal: http://adomas.org/javascript-mouse-wheel/
* prototype extension by "Frank Monnerjahn" themonnie @gmail.com
*/
extend(Event, {
wheel:function (event){
var delta = 0;
if (!event) event = window.event;
if (event.wheelDelta) {
delta = event.wheelDelta/120;
if (window.opera) delta = -delta;
} else if (event.detail) { delta = -event.detail/3; }
return Math.round(delta); //Safari Round
}
});
/*
* end of extension
*/
var counterSite=0;
function handleSite(e) {
counterSite += Event.wheel(e);
$('delta').innerHTML = counterSite +'#'+ Event.wheel(e) + ": " + (Event.wheel(e) <0 ? 'down' : 'up' );
}
var counterDIV=0;
function handleDIV(e) {
counterDIV += Event.wheel(e);
$('divdelta').innerHTML = counterDIV +'#'+ Event.wheel(e) + ": " + (Event.wheel(e) <0 ? 'down' : 'up' );
}
Usage:
Event.observe(document, "mousewheel", handleSite, false);
Event.observe(document, "DOMMouseScroll", handleSite, false); // Firefox
Event.observe($('divdelta'), "mousewheel", handleDIV, false);
Event.observe($('divdelta'), "DOMMouseScroll", handleDIV, false); // Firefox
Sunday, December 3, 2006
W3C DOM vs. innerHTML performance
I found great test page that intended to find out which method of generating large amounts of content is fastest in the browsers. Of course the results differ significantly from browser to browser.
W3C DOM vs. innerHTML
I hope this link will help improve your client code performance.
More information on JavaScript performance can be on:
The Microsoft Internet Explorer Weblog
Developer Notes for prototype.js
Here is a great link that have full explanation on prototype.js, can used as Developer Notes.
http://www.sergiopereira.com/articles/prototype.js.html
JavaScript AJAX framework prototype dissected
http://snook.ca/archives/javascript/prototype_disse/
Tuesday, November 28, 2006
JavaScript actsAsAspect
The idea is that you run actsAsAspect() on any JavaScript object,
and then your object receives 3 extra methods:
- before()
- after()
- around()
You then can use those methods to setup the callbacks you need.
The Code:
function actsAsAspect(object) {
object.yield = null;
object.rv = { };
object.before = function(method, f)
{
var original = eval("this." + method);
this[method] = function()
{
this.rv[method] = f.apply(this, arguments);
if (this.rv[method] == false)
return false;
return original.apply(this, arguments);
};
};
object.after = function(method, f)
{
var original = eval("this." + method);
this[method] = function()
{
this.rv[method] = original.apply(this, arguments);
return f.apply(this, arguments);
}
};
object.around = function(method, f)
{
var original = eval("this." + method);
this[method] = function() {
this.yield = original;
return f.apply(this, arguments);
}
};
}
Example: Applying actsAsAspect() to window
actsAsAspect(window);
function haha() { return "HA Ha ha ha..."; }
after('haha', function() { alert(this.rv['haha']); });
haha();
Full information can be found: