<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1040539" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1040539</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Ah, I see what you&#039;re</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/myfunction-function-function#comment-1227914</link>
    <description> &lt;p&gt;Ah, I see what you&#039;re getting at. It&#039;s attaching the function to an onload event, if it were just:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;function dave() {&lt;br /&gt;&amp;nbsp; ... code ...&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
That by itself wouldn&#039;t do anything, just define a function. It would work just as well to do:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;function dave() {&lt;br /&gt;&amp;nbsp; ... code ...&lt;br /&gt;}&lt;br /&gt;window.onload = dave;&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
But that&#039;s not as neat. What you first posted is a good example of Javascript&#039;s support for &lt;a href=&quot;http://en.wikipedia.org/wiki/First-class_function&quot;&gt;functions as first-class objects&lt;/a&gt;. Simply put: functions are treated just like variables in Javascript, it&#039;s pretty good stuff. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Jan 2008 18:07:49 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1227914 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Thanks for the reply jeeves,</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/myfunction-function-function#comment-1227895</link>
    <description> &lt;p&gt;Thanks for the reply jeeves, i understand what it is supposed to do what i dont understand is why you declare the function like:&lt;/p&gt;
&lt;p&gt;something = function(){&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;rather than:&lt;/p&gt;
&lt;p&gt;function(){&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
 </description>
     <pubDate>Tue, 15 Jan 2008 20:30:04 +0000</pubDate>
 <dc:creator>benf</dc:creator>
 <guid isPermaLink="false">comment 1227895 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>It looks like a function for</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/myfunction-function-function#comment-1227893</link>
    <description> &lt;p&gt;It looks like a function for recursing through all the links on a page, changing their onclick handlers to run the popUp function. Does that make sense? There&#039;s got to be more to it than that, &lt;code&gt;anc&lt;/code&gt; must be defined somewhere: getElementByTagName or something like that.&lt;/p&gt;
 </description>
     <pubDate>Tue, 15 Jan 2008 20:00:41 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1227893 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
