<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-4222197394079314848.post3071809175336157818..comments</id><updated>2011-09-09T14:54:27.789-05:00</updated><category term='Cygwin'/><category term='Microsoft .NET'/><category term='will need again'/><category term='Palm'/><category term='Apple'/><category term='Oracle'/><category term='MarkUtils'/><category term='audio'/><category term='Dell'/><category term='email'/><category term='performance'/><category term='reported bugs'/><category term='free tools'/><category term='hardware'/><category term='laptop'/><category term='IPv6'/><category term='xml'/><category term='SysAdmin'/><category term='Alltel'/><category term='technical'/><category term='OpenWrt'/><category term='security'/><category term='Appleton-WI'/><category term='Sun Microsystems'/><category term='Microsoft Word'/><category term='Java'/><category term='Blogger'/><category term='Google'/><category term='networking'/><category term='Hewlett-Packard'/><category term='LDAP'/><category term='frustrations'/><category term='life'/><category term='Firefox'/><category term='Microsoft Windows'/><category term='VMware'/><category term='JMX'/><category term='Ext JS'/><category term='web browsing'/><category term='Linux'/><category term='Rothschild-WI'/><category term='Eclipse'/><category term='coding'/><category term='WScript'/><category term='OpenOffice.org'/><category term='JavaScript'/><category term='Yahoo UI Library'/><category term='Java Swing'/><category term='Microsoft Outook'/><title type='text'>Comments on Mark A. Ziesemer: JavaScript namespace function</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blogger.ziesemer.com/feeds/3071809175336157818/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html'/><author><name>Mark A. Ziesemer</name><uri>http://www.blogger.com/profile/12752422620777325409</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_aV4l4vyh5uQ/S31T85WfmMI/AAAAAAAAA9U/nRo4aI0okiQ/S220/Facebook+Me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-887855059192301299</id><published>2011-09-09T14:54:27.789-05:00</published><updated>2011-09-09T14:54:27.789-05:00</updated><title type='text'>Anonymous - I am using this code extensively with ...</title><summary type='text'>Anonymous - I am using this code extensively with IE7, and haven&amp;#39;t observed any issues.  You will need to provide additional details - such as any errors received, expected vs. observed results, etc.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/887855059192301299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/887855059192301299'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1315598067789#c887855059192301299' title=''/><author><name>Mark A. Ziesemer</name><uri>http://www.blogger.com/profile/12752422620777325409</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03040793697038588204'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_aV4l4vyh5uQ/S31T85WfmMI/AAAAAAAAA9U/nRo4aI0okiQ/S220/Facebook+Me.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-143408883'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-58351651159819795</id><published>2011-09-09T14:21:07.109-05:00</published><updated>2011-09-09T14:21:07.109-05:00</updated><title type='text'>IE7 seems to break on this line:
o = o[ns[i]] = o[...</title><summary type='text'>IE7 seems to break on this line:&lt;br /&gt;o = o[ns[i]] = o[ns[i]] || {};</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/58351651159819795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/58351651159819795'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1315596067109#c58351651159819795' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1367772657'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-9114459032797887842</id><published>2011-04-01T11:09:08.737-05:00</published><updated>2011-04-01T11:09:08.737-05:00</updated><title type='text'>Hi, I added a recursive twist to your approach:

v...</title><summary type='text'>Hi, I added a recursive twist to your approach:&lt;br /&gt;&lt;br /&gt;var _ = function(name, container) {&lt;br /&gt;  var ns = name.split(&amp;#39;.&amp;#39;);&lt;br /&gt;  var o = container || window;&lt;br /&gt;  var i = 0;&lt;br /&gt;  var len = ns.length;&lt;br /&gt;  for(; i &amp;lt; len; ++i) {&lt;br /&gt;    o = o[ns[i]] = o[ns[i]] || {};&lt;br /&gt;  }&lt;br /&gt;  o._ = function(name){ return window._(name, o);}&lt;br /&gt;  return o;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;If I </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/9114459032797887842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/9114459032797887842'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1301674148737#c9114459032797887842' title=''/><author><name>binarez</name><uri>http://www.binarez.com</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1432335543'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-2531992771898034039</id><published>2011-02-04T08:44:08.995-06:00</published><updated>2011-02-04T08:44:08.995-06:00</updated><title type='text'>Antonio - I completely support your effort, as I i...</title><summary type='text'>Antonio - I completely support your effort, as I insist that all my code is warning-free as well.  That said, I&amp;#39;m not able to reproduce the issue that you&amp;#39;re observing.  Are you seeing it in the initial evaluation of the function, or in an execution of the function?  If an execution, can you please provide an example call that demonstrates the warning you observed?  Thanks!</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/2531992771898034039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/2531992771898034039'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1296830648995#c2531992771898034039' title=''/><author><name>Mark A. Ziesemer</name><uri>http://www.blogger.com/profile/12752422620777325409</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03040793697038588204'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://2.bp.blogspot.com/_aV4l4vyh5uQ/S31T85WfmMI/AAAAAAAAA9U/nRo4aI0okiQ/S220/Facebook+Me.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-143408883'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-7806029490007876925</id><published>2011-02-03T09:55:07.175-06:00</published><updated>2011-02-03T09:55:07.175-06:00</updated><title type='text'>Hi there,

Running the following code gives me a w...</title><summary type='text'>Hi there,&lt;br /&gt;&lt;br /&gt;Running the following code gives me a warning in Firefox 3.6.13:&lt;br /&gt;&lt;br /&gt;==== code ====&lt;br /&gt;var namespace = function(name, separator, container){&lt;br /&gt;  var ns = name.split(separator || &amp;#39;.&amp;#39;),&lt;br /&gt;    o = container || window,&lt;br /&gt;    i,&lt;br /&gt;    len;&lt;br /&gt;  for(i = 0, len = ns.length; i &amp;lt; len; i++){&lt;br /&gt;    o = o[ns[i]] = o[ns[i]] || {};&lt;br /&gt;  }&lt;br /&gt;  </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/7806029490007876925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/7806029490007876925'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1296748507175#c7806029490007876925' title=''/><author><name>Antonio</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-12182162'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-6907057884555190792</id><published>2010-05-03T05:52:27.740-05:00</published><updated>2010-05-03T05:52:27.740-05:00</updated><title type='text'>Hi!

This namespace function is a great idea. But ...</title><summary type='text'>Hi!&lt;br /&gt;&lt;br /&gt;This namespace function is a great idea. But is there a way to add private variables and functions ?&lt;br /&gt;&lt;br /&gt;Dustin Diaz does it with his namespace code : http://www.dustindiaz.com./namespace-your-javascript/&lt;br /&gt;&lt;br /&gt;Anyway, keep up the good work!</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/6907057884555190792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/6907057884555190792'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1272883947740#c6907057884555190792' title=''/><author><name>Daishi Kaszer</name><uri>http://daishi.kaszer.free.fr/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1631803345'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-7056466958606217384</id><published>2009-12-27T19:13:50.474-06:00</published><updated>2009-12-27T19:13:50.474-06:00</updated><title type='text'>Anonymous:  Not necessarily implemented once per f...</title><summary type='text'>Anonymous:  Not necessarily implemented once per file, but once per scope.  On the web and in XUL, this is pretty much once per window.  I would always declare it using &amp;quot;var&amp;quot;.  Whether it becomes global or not depends upon the scope in which it is defined.  For now, I would declare this within a closure / own function block, and then create the namespaces while you still have a valid </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/7056466958606217384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/7056466958606217384'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1261962830474#c7056466958606217384' title=''/><author><name>Mark A. Ziesemer</name><uri>http://www.blogger.com/profile/12752422620777325409</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03040793697038588204'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_aV4l4vyh5uQ/ShtLaqsYJkI/AAAAAAAAAkQ/eB_MTM01zSo/S220/n502931492_6934_6270.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-143408883'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-5902462224980671874</id><published>2009-12-18T19:43:04.962-06:00</published><updated>2009-12-18T19:43:04.962-06:00</updated><title type='text'>So do I have to implement the function in every ja...</title><summary type='text'>So do I have to implement the function in every javascript file?&lt;br /&gt;&lt;br /&gt;It appears that if the namespace function is declared as namespace = function that it becomes a global so I can then use it from all of my javascript files.&lt;br /&gt;&lt;br /&gt;The problem is that it then pollutes the global name space. On the other hand if I implement it as var namespace = function then I have to have it in every</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/5902462224980671874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/5902462224980671874'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1261186984962#c5902462224980671874' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-29719985'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-456693627129142829</id><published>2009-09-20T15:06:49.741-05:00</published><updated>2009-09-20T15:06:49.741-05:00</updated><title type='text'>jpswain09 - Sorry for the late response, but an ex...</title><summary type='text'>jpswain09 - Sorry for the late response, but an example is now included.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/456693627129142829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/456693627129142829'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1253477209741#c456693627129142829' title=''/><author><name>Mark A. Ziesemer</name><uri>http://www.blogger.com/profile/12752422620777325409</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03040793697038588204'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://4.bp.blogspot.com/_aV4l4vyh5uQ/ShtLaqsYJkI/AAAAAAAAAkQ/eB_MTM01zSo/S220/n502931492_6934_6270.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-143408883'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-3806002417977127007</id><published>2009-05-18T15:08:00.000-05:00</published><updated>2009-05-18T15:08:00.000-05:00</updated><title type='text'>Oh, dang; pardon my restating the update section a...</title><summary type='text'>Oh, dang; pardon my restating the update section above.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/3806002417977127007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/3806002417977127007'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1242677280000#c3806002417977127007' title=''/><author><name>Johan Sundström</name><uri>http://www.blogger.com/profile/04076097346172610543</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1290336249'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-6546806755275613849</id><published>2009-05-18T14:51:00.000-05:00</published><updated>2009-05-18T14:51:00.000-05:00</updated><title type='text'>Mark, in javascript, any variable that is not expl...</title><summary type='text'>Mark, in javascript, any variable that is not explicitly declared with the "var" keyword will become global, wherever you defined it. This is one of javascript's most unfortunate big warts. Try this sequence of inputs in the Firebug console if you want to convince yourself -- the latter "len" will be 12 in the global environment:&lt;br /&gt;&lt;br /&gt;len; i; function oops() { len = 1; var i = 0; } oops(); </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/6546806755275613849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/6546806755275613849'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1242676260000#c6546806755275613849' title=''/><author><name>Johan Sundström</name><uri>http://www.blogger.com/profile/04076097346172610543</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1290336249'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-3863820526693767944</id><published>2009-04-19T20:46:00.000-05:00</published><updated>2009-04-19T20:46:00.000-05:00</updated><title type='text'>Mark,

It's really cool of you to post this namesp...</title><summary type='text'>Mark,&lt;br /&gt;&lt;br /&gt;It's really cool of you to post this namespacing technique.  However, as an intermediate Java programmer who is pretty new to JavaScript, I'm pretty confused about how to make use of the namespace function to ensure that my classes all stay within my defined namespace.  Is there any way you could post a zip file or something of a mini-quickstart app that just shows 3 js files </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/3863820526693767944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/3863820526693767944'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1240191960000#c3863820526693767944' title=''/><author><name>jpswain09</name><uri>https://me.yahoo.com/jpswain09#8bdc2</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1635550506'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-5578254678919706396</id><published>2008-11-23T19:16:00.000-06:00</published><updated>2008-11-23T19:16:00.000-06:00</updated><title type='text'>It may not be exactly clear, but it is already bei...</title><summary type='text'>It may not be exactly clear, but it is already being checked for.&lt;BR/&gt;&lt;BR/&gt;Look at the part within the for loop.  If the object exists, it is used, otherwise a new object ({}) is used.&lt;BR/&gt;&lt;BR/&gt;I just looked at your link, and it does this part exactly the same way.  However, it is also hard-coded to check against a &amp;quot;DTS&amp;quot; parent, which I&amp;#39;m not at all a big fan of - as noted in the </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/5578254678919706396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/5578254678919706396'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1227489360000#c5578254678919706396' title=''/><author><name>Mark A. Ziesemer</name><uri>http://www.blogger.com/profile/12752422620777325409</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03040793697038588204'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://profile.ak.facebook.com/profile2/436/88/s502931492_26012.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-143408883'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-1929610336255860577</id><published>2008-11-23T13:51:00.000-06:00</published><updated>2008-11-23T13:51:00.000-06:00</updated><title type='text'>shoudnt we check weather the namespace is already ...</title><summary type='text'>shoudnt we check weather the namespace is already created or not? nice code though!&lt;BR/&gt;I found another nice example here: http://www.dottostring.com/2008/11/how-to-namespace-your-javascript/</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/1929610336255860577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/1929610336255860577'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1227469860000#c1929610336255860577' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1063471701'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-1314982152201883897</id><published>2008-05-13T23:10:00.000-05:00</published><updated>2008-05-13T23:10:00.000-05:00</updated><title type='text'>remy - please correct me if you still think I'm in...</title><summary type='text'>remy - please correct me if you still think I'm incorrect, but the documentation I'm reading and the examples I've run show that the "len" variable is in the same (local) scope as "i".&lt;BR/&gt;&lt;BR/&gt;I'm adding to the original post to make use of formatting that isn't supported within comments here.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/1314982152201883897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/1314982152201883897'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1210738200000#c1314982152201883897' title=''/><author><name>Mark A. Ziesemer</name><uri>http://www.blogger.com/profile/12752422620777325409</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='03040793697038588204'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://profile.ak.facebook.com/profile2/436/88/s502931492_26012.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-143408883'/></entry><entry><id>tag:blogger.com,1999:blog-4222197394079314848.post-3478786681632862775</id><published>2008-05-13T17:33:00.000-05:00</published><updated>2008-05-13T17:33:00.000-05:00</updated><title type='text'>By the way - the 'len' variable is on the global s...</title><summary type='text'>By the way - the 'len' variable is on the global scope ;-)</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/3478786681632862775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4222197394079314848/3071809175336157818/comments/default/3478786681632862775'/><link rel='alternate' type='text/html' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html?showComment=1210717980000#c3478786681632862775' title=''/><author><name>remy</name><uri>http://remysharp.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blogger.ziesemer.com/2008/05/javascript-namespace-function.html' ref='tag:blogger.com,1999:blog-4222197394079314848.post-3071809175336157818' source='http://www.blogger.com/feeds/4222197394079314848/posts/default/3071809175336157818' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1621364727'/></entry></feed>
