<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: JavaScript onload</title>
	<link>http://blog.firetree.net/2005/07/17/javascript-onload/</link>
	<description>Sharing useful things with the world.</description>
	<pubDate>Thu, 24 Jul 2008 09:37:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: Torstens Blog &#187; Problem mit onload.window bei EventCalendar3 und SimpleTags</title>
		<link>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-22774</link>
		<dc:creator>Torstens Blog &#187; Problem mit onload.window bei EventCalendar3 und SimpleTags</dc:creator>
		<pubDate>Thu, 18 Oct 2007 11:55:58 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-22774</guid>
		<description>&lt;p&gt;[...] Um die Probleme zu beheben, hat die Autorin des EventCalendar eine kleine Anleitung geschrieben, wie die Autoren anderer Plugins dieses Problem beheben k&#246;nnen. Da ich aber nicht die Geduld hatte, auf eine entsprechende Antwort im Wordpress-Deutschland Forum zu warten, habe ich mich trotz mangelnder JavaScript-Kenntnisse an das Problem gewagt und sogar geschafft, dieses auch zu beseitigen. Die &#252;berarbeiteten Dateien k&#246;nnt Ihr hier von mir downloaden: angepasste Datein f&#252;r das SimpleTags-Plugin. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[&#8230;] Um die Probleme zu beheben, hat die Autorin des EventCalendar eine kleine Anleitung geschrieben, wie die Autoren anderer Plugins dieses Problem beheben k&#246;nnen. Da ich aber nicht die Geduld hatte, auf eine entsprechende Antwort im Wordpress-Deutschland Forum zu warten, habe ich mich trotz mangelnder JavaScript-Kenntnisse an das Problem gewagt und sogar geschafft, dieses auch zu beseitigen. Die &#252;berarbeiteten Dateien k&#246;nnt Ihr hier von mir downloaden: angepasste Datein f&#252;r das SimpleTags-Plugin. [&#8230;]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: mohan</title>
		<link>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-17997</link>
		<dc:creator>mohan</dc:creator>
		<pubDate>Sat, 09 Jun 2007 22:17:30 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-17997</guid>
		<description>&lt;p&gt;I want to keep a header java script in a separate file and have this script loaded to different pages when the page opens, How do I do that?
Thanks
Mohan&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I want to keep a header java script in a separate file and have this script loaded to different pages when the page opens, How do I do that?
Thanks
Mohan</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Optimus Pete &#187; Blog Archive &#187; JS: Execute JavaScript on Page Load</title>
		<link>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-14103</link>
		<dc:creator>Optimus Pete &#187; Blog Archive &#187; JS: Execute JavaScript on Page Load</dc:creator>
		<pubDate>Mon, 14 May 2007 10:46:26 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-14103</guid>
		<description>&lt;p&gt;[...] I originally saw this technique here. Alternative JS initialisation scripts are available but so far this one has worked well for me, so Iâ€™ll be sticking with it. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[&#8230;] I originally saw this technique here. Alternative JS initialisation scripts are available but so far this one has worked well for me, so Iâ€™ll be sticking with it. [&#8230;]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon</title>
		<link>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-7724</link>
		<dc:creator>Brandon</dc:creator>
		<pubDate>Tue, 27 Feb 2007 21:54:33 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-7724</guid>
		<description>&lt;p&gt;Exactly what I was looking for, and it works like a charm!  Thanks a ton.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Exactly what I was looking for, and it works like a charm!  Thanks a ton.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-7030</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 31 Jan 2007 17:38:07 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-7030</guid>
		<description>&lt;p&gt;Works for me! Thanks for the help!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Works for me! Thanks for the help!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dag Sverre</title>
		<link>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-6993</link>
		<dc:creator>Dag Sverre</dc:creator>
		<pubDate>Tue, 30 Jan 2007 11:45:01 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-6993</guid>
		<description>&lt;p&gt;Re paranthesis on f: I believe strongly it is bad to make "function behave more robust" against user error. Fail early and fail violently, that's the best way to avoid bugs. If you are actually calling this things with a null parameter then you probably have a bug somewhere else in your script!&lt;/p&gt;

&lt;p&gt;If anything, add a check at the top: if (typeof(f) != 'function') throw "f cannot be null";&lt;/p&gt;

&lt;p&gt;BTW, standard-compliant etc. way of doing this is using window.addEventListener, which doesn't replace the original event handler. However IE doesn't support it (but has an attachEvent which might work the same, not sure).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Re paranthesis on f: I believe strongly it is bad to make &#8220;function behave more robust&#8221; against user error. Fail early and fail violently, that&#8217;s the best way to avoid bugs. If you are actually calling this things with a null parameter then you probably have a bug somewhere else in your script!</p>

<p>If anything, add a check at the top: if (typeof(f) != &#8216;function&#8217;) throw &#8220;f cannot be null&#8221;;</p>

<p>BTW, standard-compliant etc. way of doing this is using window.addEventListener, which doesn&#8217;t replace the original event handler. However IE doesn&#8217;t support it (but has an attachEvent which might work the same, not sure).</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-6442</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Wed, 10 Jan 2007 18:16:58 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-6442</guid>
		<description>&lt;p&gt;Thanks so much.  I'm using Event Calendar inside an onLoad collapsible menu, and I couldn't figure out why the "Prev" and "Next" links weren't dynamic until you explained it on the Event Calendar blog.  Using this fix, it works like a charm....I really appreciate it!!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks so much.  I&#8217;m using Event Calendar inside an onLoad collapsible menu, and I couldn&#8217;t figure out why the &#8220;Prev&#8221; and &#8220;Next&#8221; links weren&#8217;t dynamic until you explained it on the Event Calendar blog.  Using this fix, it works like a charm&#8230;.I really appreciate it!!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Hamilton</title>
		<link>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-6276</link>
		<dc:creator>Adam Hamilton</dc:creator>
		<pubDate>Tue, 02 Jan 2007 03:16:49 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-6276</guid>
		<description>&lt;p&gt;I finally nailed down that "F is not a function" error yesterday - my script dynamically added 0 to n functions to WindowOnload, and having 0 functions added resulted in f being null.  Thus, f() is not valid, because a null function cannot be called.  However, using f (no parenthesis), we get the same result if f is not null; if f is null, this statement evaluates to 'null;', which is also valid.  So removing the parenthesis should make the function more robust, although they are not technically an error.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I finally nailed down that &#8220;F is not a function&#8221; error yesterday - my script dynamically added 0 to n functions to WindowOnload, and having 0 functions added resulted in f being null.  Thus, f() is not valid, because a null function cannot be called.  However, using f (no parenthesis), we get the same result if f is not null; if f is null, this statement evaluates to &#8216;null;&#8217;, which is also valid.  So removing the parenthesis should make the function more robust, although they are not technically an error.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Oliver</title>
		<link>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-6079</link>
		<dc:creator>Oliver</dc:creator>
		<pubDate>Tue, 19 Dec 2006 16:45:44 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-6079</guid>
		<description>&lt;p&gt;@Blackshadow&lt;/p&gt;

&lt;p&gt;To call a function with a parameters, wrap the call in another function that doesn't take parameters:&lt;/p&gt;

&lt;p&gt;WindowOnload(function() { myInitFunction(param) });&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Blackshadow</p>

<p>To call a function with a parameters, wrap the call in another function that doesn&#8217;t take parameters:</p>

<p>WindowOnload(function() { myInitFunction(param) });</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-5909</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Wed, 29 Nov 2006 13:47:42 +0000</pubDate>
		<guid>http://blog.firetree.net/2005/07/17/javascript-onload/#comment-5909</guid>
		<description>&lt;p&gt;How about a function for removing a specific function call from an existing event.&lt;/p&gt;

&lt;p&gt;I can convert the event (windows.onload) to a string and then manipulate the string, but how can I re-attach the string as an event again...&lt;/p&gt;

&lt;p&gt;Or is there a better way of detecting a function call in an event and then targeting it for removal?&lt;/p&gt;

&lt;p&gt;I realise I can simply remove all function calls from an event, but I'd prefer to remove the specific function call.&lt;/p&gt;

&lt;p&gt;Thanks,
Ryan&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>How about a function for removing a specific function call from an existing event.</p>

<p>I can convert the event (windows.onload) to a string and then manipulate the string, but how can I re-attach the string as an event again&#8230;</p>

<p>Or is there a better way of detecting a function call in an event and then targeting it for removal?</p>

<p>I realise I can simply remove all function calls from an event, but I&#8217;d prefer to remove the specific function call.</p>

<p>Thanks,
Ryan</p>]]></content:encoded>
	</item>
</channel>
</rss>
