We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

alvaroisorna on 07/10/06


Tagged

javascript template prototypejs


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

xaviaracil
mate


Template - New JavaScript File


Published in: JavaScript 


this is the template i mostly use when create new js files

  1. // new-file-name.js
  2. // dependencies: /js/prototype-1.4.0.js
  3. // /css/default.css
  4.  
  5. Event.observe(window, 'load', function(poEvent){
  6. $A(document.getElementsByTagName('*')).each(function(poElement){Element.cleanWhitespace(poElement)});
  7. $A(document.getElementsByTagName('FORM')).each(function(poElement){poElement.reset();});
  8.  
  9. }, false);

Report this snippet 

You need to login to post a comment.