From: Ivan Kohler Date: Thu, 23 Jan 2014 22:41:20 +0000 (-0800) Subject: add onload.js to 2.3 branch, for mac addresses, RT#27190, RT#26013 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=e2c0189bf2deb08a5423226a5adc4d245e64bf4f add onload.js to 2.3 branch, for mac addresses, RT#27190, RT#26013 --- diff --git a/httemplate/elements/onload.js b/httemplate/elements/onload.js new file mode 100644 index 000000000..c7bbbb283 --- /dev/null +++ b/httemplate/elements/onload.js @@ -0,0 +1,23 @@ +<%doc> +Filter component to attach a window.onload handler. + +Usage: + + + +(function() { + var myonload = function() { +<% $m->content %> + } + if ( window.addEventListener ) { + window.addEventListener('load', myonload); + } else if ( window.attachEvent ) { + window.attachEvent('onload', myonload); + } +})();