When using $$ in Prototype, the result is an array. You need to loop through the array to attach the observe function. Expl. $$(‘.myitems‘).each(function(item) { item.observe(‘click’,function(){alert (‘clicked’)});}); or $$(‘.myitems’).invoke(‘observe’, ‘click’, function() {alert(‘clicked’)});… Read More


Some things to keep in mind when using images: jpeg’s are for pictures gif was for logos, use png-8 instead (sidenote) use smushit.com to remove metadata when possible use tiles… Read More


It’s not possible to fire the default events with Prototype 1.6. Only custom events are supported. $(‘mybutton’).observe(‘click’,function(){…}); $(‘mybutton’).fire(‘click’); will not work $(‘myinput’).observe(‘input:changed’,function(){….}); $(‘myinput’).fire(‘input:changed’); does work… Read More


observing: $(‘mycheckbox’).observe(‘click’, function(e){alert(‘checked = ‘ + this.checked);}); setting throught scripting: $(‘mycheckbox’).checked = true; $(‘mycheckbox’).setAttribute(‘checked’, true); $(‘mycheckbox’).setValue(”); // will un-check/null value $(‘mycheckbox’).setValue(‘anything’); // will check/on value $(‘mycheckbox’).click(); // will toggle the checkbox… Read More