// ############################################## // # openforms.js for mootools v1.2+ # // # opens forms in a new browser window # // ############################################## var openForms = new Class({ //implements Implements: [Options], //options options: { collection: $$('.formopen') }, //initialization initialize: function(options) { //set options this.setOptions(options); this.defaults(); }, //a method that does whatever you want defaults: function() { this.options.collection.each(function(el){ el.addEvents({ 'submit': function(evt){ new Event(evt).stop(); var myform = el; var url = myform.getProperty('action') + "?" + myform.toQueryString(); window.open(url); } }); }); } }); // window.addEvent('domready', function() { // var defs = new inputClear({ // collection: $$('input.defs') // }); // });