<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>JavaScript</title>
        <link>http://blog.galasoft.ch/category/4809.aspx</link>
        <description>Client-side JavaScript</description>
        <language>en-US</language>
        <copyright>Laurent Bugnion</copyright>
        <managingEditor>laurent@galasoft.ch</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
        <item>
            <title>Talking at MIX09: Las Vegas and the continuum</title>
            <link>http://blog.galasoft.ch/archive/2009/02/21/talking-at-mix09-las-vegas-and-the-continuum.aspx</link>
            <description>&lt;a href="http://2009.visitmix.com/"&gt;&lt;img style="border-right-width: 0px; margin: 0px 10px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" align="left" src="http://geekswithblogs.net/images/geekswithblogs_net/lbugnion/4797/r_MIX09_BlogBling_InterfaceCreativity_CR4_3.jpg" /&gt;&lt;/a&gt;   &lt;p&gt;One of my dreams is going to come true: Since the very first time I attended &lt;a href="http://2009.visitmix.com/"&gt;MIX&lt;/a&gt; in 2006, I have wanted to talk there. MIX has a very special meaning for me. It is in the Venetian conference rooms that I heard about Windows Presentation Foundation and what would later become Silverlight. It is there that me and my two colleagues Andreas and James decided that we wanted WPF for the project we had just started at Siemens. A decision that was definitely the right one, from a technical point of view but also from a user experience point of view. It is at MIX 2007 that I started to talk to people from my current firm &lt;a href="http://identitymine.com/"&gt;IdentityMine&lt;/a&gt; about the possibility to join them, which I did in December 2008.&lt;/p&gt;  &lt;p&gt;In short, the MIX conference has a special place in my professional life, and I am very glad and honored to announce that one of the sessions I proposed has been accepted. Yes, I will be talking at MIX 2009! My session just appeared on the sessions list at    &lt;br /&gt;&lt;a title="https://content.visitmix.com/2009/sessions/" href="https://content.visitmix.com/2009/sessions/"&gt;https://content.visitmix.com/2009/sessions/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And my short bio can be seen at    &lt;br /&gt;&lt;a title="https://content.visitmix.com/2009/speakers/" href="https://content.visitmix.com/2009/speakers/"&gt;https://content.visitmix.com/2009/speakers/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The session's title is:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Working across the Client Continuum&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Come see how to build a continuum of client applications including HTML, AJAX, ASP.NET, Microsoft Silverlight, and Windows Presentation Foundation (WFP) that all consume the same Windows Communication Foundation (WCF) service. Learn how to reuse as much code as possible, how to optimize the development process, and how to address key logistical issues like external servers and cross domain communication.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I really hope I will see many of you at my session. For those of you who cannot come, it will be recorded (like MIX08 and PDC08 were too). But let's face it, nothing replaces the real MIX, and nothing replaces Vegas, baby!&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=129585"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=129585" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://blog.galasoft.ch/aggbug/129585.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://blog.galasoft.ch/archive/2009/02/21/talking-at-mix09-las-vegas-and-the-continuum.aspx</guid>
            <pubDate>Sun, 22 Feb 2009 10:33:30 GMT</pubDate>
            <wfw:comment>http://blog.galasoft.ch/comments/129585.aspx</wfw:comment>
            <comments>http://blog.galasoft.ch/archive/2009/02/21/talking-at-mix09-las-vegas-and-the-continuum.aspx#feedback</comments>
            <wfw:commentRss>http://blog.galasoft.ch/comments/commentRss/129585.aspx</wfw:commentRss>
            <trackback:ping>http://blog.galasoft.ch/services/trackbacks/129585.aspx</trackback:ping>
        </item>
        <item>
            <title>Microsoft to add jQuery in Visual Studio: Why I think it's great</title>
            <link>http://blog.galasoft.ch/archive/2008/09/29/microsoft-to-add-jquery-in-visual-studio-why-i-think.aspx</link>
            <description>&lt;p class="gslb_rsbPParagraph"&gt; The news took the community by surprise and the reactions are overwhelmingly positive: Microsoft is going to ship jQuery with the ASP.NET MVC framework (very soon) and with Visual Studio (in a near future). For more details, &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx" target="_blank"&gt;ScottGu&lt;/a&gt; and &lt;a href="http://www.hanselman.com/blog/jQuerytoshipwithASPNETMVCandVisualStudio.aspx" target="_blank"&gt;Scott Hanselman&lt;/a&gt; are talking about that in a very complete way. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt; I think it's great news on many levels. First, because I hear that jQuery is a great framework. I must admit I never used it, because I didn't do much web development lately (but I will get back to it in a number of private projects soon) and also because I am usually wary of frameworks and prefer to develop my own JavaScript. Of course this is only viable because I used JavaScript mainly on small private projects for the past few years, and I wanted to have the learning effect of programming against it directly instead of having a higher level framework to "talk to". I think that now is the time for me to look more into it, however, and this is just what I will do for my site &lt;a href="www.galasoft.ch"&gt;www.galasoft.ch&lt;/a&gt; which needs a rather heavy facelift anyway. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt; But more importantly, it's a major step forward for Microsoft. There was a request for similar functionality in ASP.NET AJAX. This was on the list of requirements for a future version. And yet, instead of using the vast resources at their disposal, Microsoft decided to use an existing, widely acknowledged open source framework. They also plan to contribute patches to jQuery, but will do so following the standard procedure that this open source framework is already using. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt; This is really newsworthy because there are many other areas where such a decision could also be taken. I don't even want to talk about the Entity Framework vs NHibernate fiasco that so many others already dissected. But think about all the other areas: Testability immediately comes to mind... &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt; Of course this also raises questions. &lt;a href="http://www.lazycoder.com/weblog/2008/09/28/visual-studio-shipping-with-jquery/" target="_blank"&gt;Scott Koon&lt;/a&gt; already mentioned some of them, the one that I particularly appreciate being: "&lt;span style="font-style:italic;"&gt;How will companies who are normally allergic to OSS code react to this [...]&lt;/span&gt;". After having worked for almost 13 years for Siemens, I know what he means. Every time we proposed an OSS technology, the question was always: Is that really safe. And I have to admit that, given the development timespan of some of our projects (typically 2 years between variant analysis and first release) and the lifespan of our products (typically more than 10 years and often much more than that), sometimes I have been careful with that too. See what happened to NDoc for example. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt; Still, there are so many other projects where OSS totally makes sense, and where Microsoft can save time and energy instead of reinventing the wheel. I am really glad to see that happening today, and think it's a great sign for Microsoft and for all .NET developers out there. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=125510"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=125510" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://blog.galasoft.ch/aggbug/125510.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://blog.galasoft.ch/archive/2008/09/29/microsoft-to-add-jquery-in-visual-studio-why-i-think.aspx</guid>
            <pubDate>Mon, 29 Sep 2008 12:44:28 GMT</pubDate>
            <wfw:comment>http://blog.galasoft.ch/comments/125510.aspx</wfw:comment>
            <comments>http://blog.galasoft.ch/archive/2008/09/29/microsoft-to-add-jquery-in-visual-studio-why-i-think.aspx#feedback</comments>
            <wfw:commentRss>http://blog.galasoft.ch/comments/commentRss/125510.aspx</wfw:commentRss>
            <trackback:ping>http://blog.galasoft.ch/services/trackbacks/125510.aspx</trackback:ping>
        </item>
        <item>
            <title>Google search on my website</title>
            <link>http://blog.galasoft.ch/archive/2007/09/01/Google-search-on-my-website.aspx</link>
            <description>&lt;p class="gslb_rsbPParagraph"&gt;I've been wanting to add a search box to &lt;a href="http://www.galasoft.ch" target="_blank"&gt;my website&lt;/a&gt; for quite some time, and also wanted to play with &lt;a href="http://code.google.com/apis/ajaxsearch/" target="_blank"&gt;Google AJAX Search API&lt;/a&gt;. Turns out it's a very easy API to use! I simply wrapped their search control in a &lt;a href="http://www.galasoft.ch/myjavascript/WebControls/positioned-node.html" target="_blank"&gt;PositionedNode&lt;/a&gt; and &lt;a href="http://www.galasoft.ch/myjavascript/WebControls/faded-node.html" target="_blank"&gt;FadedNode&lt;/a&gt;, and added a higher-lever object to "hide" Google's syntax and offer a higher level interface. So from today, you can now use the "Search" menu to search the website and also (in the same dialog) this blog. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt;Google Search API also offers the possibility to search for YouTube videos and for places (using Google Maps), but I don't use this, so I left that out of my wrapper. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt;Next on my list is: &lt;/p&gt; &lt;ol class="gslb_rsbList"&gt; &lt;li&gt;Add the same feature to the &lt;a href="http://geekswithblogs.net/lbugnion" target="_blank"&gt;GeeksWithBlogs&lt;/a&gt; blog  &lt;/li&gt;&lt;li&gt;Wrap the client-side control in a server-side ASP.NET control, to make it even easier to use. &lt;/li&gt;&lt;/ol&gt; &lt;p class="gslb_rsbPParagraph"&gt;Let me know if you have other suggestions! &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt;&lt;a href="http://www.galasoft.ch/blogs-all/Googlesearchonmywebsite_B995/image.png" atomicselection="true"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="218" alt="Google search" src="http://www.galasoft.ch/blogs-all/Googlesearchonmywebsite_B995/image_thumb.png" width="540" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115113"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=115113" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://blog.galasoft.ch/aggbug/115113.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://blog.galasoft.ch/archive/2007/09/01/Google-search-on-my-website.aspx</guid>
            <pubDate>Sun, 02 Sep 2007 11:20:20 GMT</pubDate>
            <wfw:comment>http://blog.galasoft.ch/comments/115113.aspx</wfw:comment>
            <comments>http://blog.galasoft.ch/archive/2007/09/01/Google-search-on-my-website.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://blog.galasoft.ch/comments/commentRss/115113.aspx</wfw:commentRss>
            <trackback:ping>http://blog.galasoft.ch/services/trackbacks/115113.aspx</trackback:ping>
        </item>
        <item>
            <title>Updated PositionedNode (DHTML effect) / Arrived in Tacoma</title>
            <link>http://blog.galasoft.ch/archive/2007/03/26/109817.aspx</link>
            <description>&lt;div class="gslb_rsbDivParagraph"&gt;
End of January, I made an update to my &lt;a href="http://www.galasoft-lb.ch/myjavascript/WebControls/positioned-node.html"&gt;PositionedNode&lt;/a&gt; DHTML effect, but too busy with WPF activities, I never managed to publish it. Having just sat 14 hours in a plane, I finally took the time to do it. There are 4 major changes:
&lt;/div&gt;

&lt;ul class="gslb_rsbList"&gt;
&lt;li&gt;
With V1.2, it's now possible to use any CSS unit to position the HTML element, for example em, points (pt), pixels (px). This functionality uses the JavaScript class &lt;a href="http://www.galasoft-lb.ch/myjavascript/WebControls/css-length.html"&gt;gslb.CssLength&lt;/a&gt;.
&lt;/li&gt;
&lt;li&gt;
It's now possible to specify all the style attributes in external CSS files, using either the "class" or the "ID" notation. Of course cascaded classes are supported.
&lt;/li&gt;
&lt;li&gt;
When using the method &lt;a href="http://www.galasoft-lb.ch/myjavascript/WebControls/positioned-node.html#methods_relocate"&gt;relocate&lt;/a&gt;, the new position can now be saved to a cookie. This way, when the page is refreshed, the new location is preserved. Use the options &lt;a href="http://www.galasoft-lb.ch/myjavascript/WebControls/positioned-node.html#options_bSaveRelocationInCookie"&gt;bSaveRelocationInCookie&lt;/a&gt; and &lt;a href="http://www.galasoft-lb.ch/myjavascript/WebControls/positioned-node.html#options_iCookieExpirationHours"&gt;iCookieExpirationHours&lt;/a&gt; to control this feature.

&lt;/li&gt;
&lt;li&gt;
The code has been refactored in 2 objects (PositionedNode and PositionedBase) to facilitate future development. The basic class gslb.Object is used for the inheritance.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="gslb_rsbDivTitle"&gt;
Tacoma, WA
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
So I am now in Tacoma (actually, I am still sitting in the plane to Chicago as I write this, but I am anticipating that the rest of the journey will go OK). I took my new Linksys wireless router, because the rooms are having wired internet "only", curious to see how it's going to work out (PS: it works great!). I tested on Saturday at home and it worked great with my laptop and my Palm TX. Should make surfing in the room easier! Today we're starting with the training, I can't wait (literally... haven't been so excited by a software training for a loooong time!). I'll report more in the next few days.
&lt;/div&gt;
&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=109817"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=109817" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://blog.galasoft.ch/aggbug/109817.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://blog.galasoft.ch/archive/2007/03/26/109817.aspx</guid>
            <pubDate>Tue, 27 Mar 2007 01:17:00 GMT</pubDate>
            <wfw:comment>http://blog.galasoft.ch/comments/109817.aspx</wfw:comment>
            <comments>http://blog.galasoft.ch/archive/2007/03/26/109817.aspx#feedback</comments>
            <wfw:commentRss>http://blog.galasoft.ch/comments/commentRss/109817.aspx</wfw:commentRss>
            <trackback:ping>http://blog.galasoft.ch/services/trackbacks/109817.aspx</trackback:ping>
        </item>
        <item>
            <title>Updated FadedNode (DHTML) / Archived old JavaScript pages</title>
            <link>http://blog.galasoft.ch/archive/2007/03/24/109711.aspx</link>
            <description>&lt;div class="gslb_rsbDivParagraph"&gt;
This &lt;a href="http://www.galasoft-lb.ch/myjavascript/WebControls/faded-node.html"&gt;DHTML fading effect&lt;/a&gt;, where a given node's opacity changes smoothly from one minimum value to a maximum value and back, has been updated. The update is very minor: Now it's not necessary anymore to define an opacity in the node's "style" attribute. The opacity can be defined in external CSS files, or even not be defined at all (in which case the opacity is equal to 100%).
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
Also, I archived my old "JavaScript consulting" pages. Most of the advices given on these pages are still valid, but the pages are not maintained anymore, and this is now clearly indicated. &lt;a href="http://www.galasoft-lb.ch/myjavascript/consulting/index.html"&gt;These pages&lt;/a&gt; are still available on my website anyway.
&lt;/div&gt;
&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=109711"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=109711" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://blog.galasoft.ch/aggbug/109711.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://blog.galasoft.ch/archive/2007/03/24/109711.aspx</guid>
            <pubDate>Sun, 25 Mar 2007 10:19:00 GMT</pubDate>
            <wfw:comment>http://blog.galasoft.ch/comments/109711.aspx</wfw:comment>
            <comments>http://blog.galasoft.ch/archive/2007/03/24/109711.aspx#feedback</comments>
            <wfw:commentRss>http://blog.galasoft.ch/comments/commentRss/109711.aspx</wfw:commentRss>
            <trackback:ping>http://blog.galasoft.ch/services/trackbacks/109711.aspx</trackback:ping>
        </item>
        <item>
            <title>JavaScript code minimizer (not obfuscator!)</title>
            <link>http://blog.galasoft.ch/archive/2007/02/23/107120.aspx</link>
            <description>&lt;div class="gslb_rsbDivParagraph"&gt;
A few years ago, I translated Douglas Crockford's &lt;a href="http://www.crockford.com/javascript/jsmin.html" target="_blank"&gt;JsMin&lt;/a&gt; from C to C#, because we wanted to use this functionality in our build process. JsMin is a code minimizer for JavaScript. It will remove all comments, empty lines, turn tabs into single spaces, etc... The goal is to reduce the size of JavaScript files to the minimum necessary, without modifying the functionality.
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
Additionally to reducing the script's size, JsMin also makes it more difficult to read, however it is not an obfuscator. Objects, variables, methods names are not modified. While such a functionality wouldn't be very difficult to add, we believe that it is pointless to obfuscate JavaScript files.
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
Note: This is a direct translation from C (procedural) to C#. I didn't refactor the object too much, so the design is far from perfect, but it works well.
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;

Note 2: I just found out that Douglas translated JsMin from C to C# too, his version is available &lt;a href="http://www.crockford.com/javascript/jsmin.cs"&gt;here&lt;/a&gt;, so pick the one you prefer ;-)
&lt;/div&gt;
&lt;div class="gslb_rsbDivTitle"&gt;
Live demo
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
&lt;A href="http://www.galasoft-lb.ch/mydotnet/GalaSoftLb.Utilities/jsmin.aspx"&gt;This page&lt;/a&gt; has a form allowing the user to send a JavaScript file to the web server. The file will be minimized and returned to the user.
&lt;/div&gt;
&lt;div class="gslb_rsbDivTitle"&gt;
Methods list
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
JsMin has only a default constructor, but it also has a few public properties used to set options:

&lt;/div&gt;
&lt;ul class="gslb_rsbList"&gt;
&lt;li&gt;
&lt;span style="font-weight: bold"&gt;string BakFileExtension&lt;/span&gt;: The extension used for the backup file. Note: The default file will be kept only if the method Go( string, bool ) is used, and the second parameter set to true. Default: "bak".
&lt;/li&gt;
&lt;li&gt;
&lt;span style="font-weight: bold"&gt;string[] FirstLines&lt;/span&gt;: An array of strings which will be added on top of the minimized file. Each entry in the array is one line in the target file. This can be used to specify copyright information, author name, etc...
&lt;/li&gt;
&lt;li&gt;
&lt;span style="font-weight: bold"&gt;int KeepFirstLines&lt;/span&gt;: A number specifying how many lines in the original file will be copied as is in the target file. For example, this is useful to preserve copyright information, author name... present in the original file.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
The C# version of JsMin provided here offers 3 public methods to minimize JavaScript files:

&lt;/div&gt;
&lt;ul class="gslb_rsbList"&gt;
&lt;li&gt;
&lt;span style="font-weight: bold"&gt;Go( string filePath )&lt;/span&gt;: Minimizes a script file and saves it under the same name as the original file. No backup is kept.
&lt;/li&gt;
&lt;li&gt;
&lt;span style="font-weight: bold"&gt;Go( string filePath, bool keepBakFile )&lt;/span&gt;: Minimizes a script file and saves it under the same name as the original file. Depending on the value of the parameter &lt;span style="font-weight: bold;"&gt;keepBakFile&lt;/span&gt;, a backup file will be kept or not.
&lt;/li&gt;
&lt;li&gt;
&lt;span style="font-weight: bold"&gt;Go( StreamReader reader, StreamWriter writer )&lt;/span&gt;: Minimizes the content of the "reader" stream and saves it to the "writer" stream. This method is useful when no file is available. For example, in ASP.NET, this method can be used to minimize script files contained in resources dynamically. Another use is described here under: The user of this webpage selects a local script file and sends it to the web server. The file content is minimized, and returned to the user as an attachment, so that the user can choose to open or save the file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="gslb_rsbDivTitle"&gt;
Code example: ASP.NET
&lt;/div&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre;"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; bnSubmit_Click( &lt;span class="kwrd"&gt;object&lt;/span&gt; sender,
  &lt;span class="type"&gt;EventArgs&lt;/span&gt; e )
{
  &lt;span class="kwrd"&gt;try&lt;/span&gt;

  {
    &lt;span class="rem"&gt;// Clear the response to avoid any unwanted&lt;/span&gt;
    &lt;span class="rem"&gt;// additions to the file.&lt;/span&gt;
    Response.Clear();
    Response.BufferOutput = &lt;span class="kwrd"&gt;true&lt;/span&gt;;

    &lt;span class="rem"&gt;// Instantiate the minimizer.&lt;/span&gt;
    &lt;span class="type"&gt;JsMin&lt;/span&gt; jsMin = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="type"&gt;JsMin&lt;/span&gt;();

    &lt;span class="rem"&gt;// taFirstLines is a text area allowing the&lt;/span&gt;

    &lt;span class="rem"&gt;// user to enter first lines to be added to&lt;/span&gt;
    &lt;span class="rem"&gt;// the minimized file.&lt;/span&gt;
    &lt;span class="kwrd"&gt;if&lt;/span&gt; ( taFirstLines.Text.Length &amp;gt; 0 )
    {
      &lt;span class="kwrd"&gt;string&lt;/span&gt;[] firstLines
        = taFirstLines.Text.Split(
          &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[] { &lt;span class="str"&gt;"\r\n"&lt;/span&gt; },
            &lt;span class="type"&gt;StringSplitOptions&lt;/span&gt;.None );
      jsMin.FirstLines = firstLines;
    }

    &lt;span class="rem"&gt;// tfKeepLines is a text field, where the user can&lt;/span&gt;

    &lt;span class="rem"&gt;// specify how many lines of the original file&lt;/span&gt;
    &lt;span class="rem"&gt;// must be written as is to the minimized file.&lt;/span&gt;
    &lt;span class="kwrd"&gt;if&lt;/span&gt; ( tfKeepLines.Text.Length &amp;gt; 0 )
    {
      &lt;span class="kwrd"&gt;try&lt;/span&gt;
      {
        &lt;span class="kwrd"&gt;int&lt;/span&gt; keepLines
          = &lt;span class="type"&gt;Int32&lt;/span&gt;.Parse( tfKeepLines.Text );
        jsMin.KeepFirstLines = keepLines;
      }
      &lt;span class="kwrd"&gt;catch&lt;/span&gt;

      {
      }
    }

    &lt;span class="kwrd"&gt;using&lt;/span&gt; ( &lt;span class="type"&gt;StreamReader&lt;/span&gt; input
      = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="type"&gt;StreamReader&lt;/span&gt;( fupScriptFile.FileContent ) )
    {
      &lt;span class="kwrd"&gt;using&lt;/span&gt; ( &lt;span class="type"&gt;StreamWriter&lt;/span&gt; output
        = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="type"&gt;StreamWriter&lt;/span&gt;( Response.OutputStream ) )
      {
        &lt;span class="rem"&gt;// Call the minimizing method.&lt;/span&gt;

        jsMin.Go( input, output );

        &lt;span class="rem"&gt;// Specify the content as text to trigger&lt;/span&gt;
        &lt;span class="rem"&gt;// the "open/save" dialog.&lt;/span&gt;
        Response.ContentType = &lt;span class="str"&gt;"text/javascript"&lt;/span&gt;;
        &lt;span class="rem"&gt;// Specify that the content should be returned&lt;/span&gt;
        &lt;span class="rem"&gt;// as an attachment.&lt;/span&gt;
        Response.AddHeader( &lt;span class="str"&gt;"Content-disposition"&lt;/span&gt;,
          &lt;span class="str"&gt;"attachment; filename="&lt;/span&gt;

          + fupScriptFile.FileName );
      }
    }
  }
  &lt;span class="kwrd"&gt;catch&lt;/span&gt; ( &lt;span class="type"&gt;Exception&lt;/span&gt; )
  {
    &lt;span class="rem"&gt;// There was an error --&amp;gt; clear the response&lt;/span&gt;
    &lt;span class="rem"&gt;// and return a HTML formatted error message.&lt;/span&gt;
    Response.Clear();
    Response.ClearHeaders();
    Response.ContentType = &lt;span class="str"&gt;"text/html"&lt;/span&gt;;
    Response.Write( &lt;span class="str"&gt;"We're sorry, there was an error."&lt;/span&gt; );
  }
  &lt;span class="kwrd"&gt;finally&lt;/span&gt;

  {
    &lt;span class="rem"&gt;// Flush the response and close it.&lt;/span&gt;
    Response.Flush();
    Response.Close();

    &lt;span class="rem"&gt;// Prevent that anything more is added to the Response&lt;/span&gt;
    Response.End();
  }
}
&lt;/div&gt;
&lt;div class="gslb_rsbDivLegend"&gt;
Receiving, minimizing and sending a script file in ASP.NET
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=107120"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=107120" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://blog.galasoft.ch/aggbug/107120.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://blog.galasoft.ch/archive/2007/02/23/107120.aspx</guid>
            <pubDate>Sat, 24 Feb 2007 04:47:00 GMT</pubDate>
            <wfw:comment>http://blog.galasoft.ch/comments/107120.aspx</wfw:comment>
            <comments>http://blog.galasoft.ch/archive/2007/02/23/107120.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://blog.galasoft.ch/comments/commentRss/107120.aspx</wfw:commentRss>
            <trackback:ping>http://blog.galasoft.ch/services/trackbacks/107120.aspx</trackback:ping>
        </item>
        <item>
            <title>JavaScript guidelines published</title>
            <link>http://blog.galasoft.ch/archive/2007/02/05/105493.aspx</link>
            <description>&lt;div class="gslb_rsbDivParagraph"&gt;
In agreement with the head of our R&amp;amp;D department, I published my firm's &lt;a href="http://www.galasoft-lb.ch/myjavascript/Siemens_SBT_JavaScript_Coding_Guidelines.pdf" target="_blank"&gt;JavaScript Coding Guidelines&lt;/a&gt;. I work for Siemens Building Technologies. We developed these guidelines for a web application project in 2004, based on our C# guidelines.
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
Please note the following:
&lt;/div&gt;
&lt;ul class="gslb_rsbList"&gt;
&lt;li&gt;
The purpose of publishing this document on the World Wide Web is to promote and encourage consistent practices in the JavaScript programming community.
&lt;/li&gt;
&lt;li&gt;

We publish this document as information only. Siemens will not accept any responsibility regarding its content.
&lt;/li&gt;
&lt;li&gt;
The guidelines are recommendations based on our experience, and may or may not make sense in the context of a different company, or a different project. Their intent is to be a source of inspiration for other JavaScript developers, and nothing more.
&lt;/li&gt;
&lt;li&gt;
The guidelines are dated 20th of April 2004, which is quite some time ago. I think that most of the recommendations are still valid, but of course additions can be made.
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=105493"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=105493" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://blog.galasoft.ch/aggbug/105493.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://blog.galasoft.ch/archive/2007/02/05/105493.aspx</guid>
            <pubDate>Tue, 06 Feb 2007 03:19:00 GMT</pubDate>
            <wfw:comment>http://blog.galasoft.ch/comments/105493.aspx</wfw:comment>
            <comments>http://blog.galasoft.ch/archive/2007/02/05/105493.aspx#feedback</comments>
            <wfw:commentRss>http://blog.galasoft.ch/comments/commentRss/105493.aspx</wfw:commentRss>
            <trackback:ping>http://blog.galasoft.ch/services/trackbacks/105493.aspx</trackback:ping>
        </item>
        <item>
            <title>JavaScript: CSS length manipulation and conversion</title>
            <link>http://blog.galasoft.ch/archive/2007/01/27/104747.aspx</link>
            <description>&lt;div class="gslb_rsbDivParagraph"&gt;
&lt;a href="http://www.galasoft-lb.ch/myjavascript/WebControls/css-length.html"&gt;CssLength&lt;/a&gt; class: In the course of improving my DHTML &lt;a href="http://www.galasoft-lb.ch/myjavascript/WebControls/positioned-node.html"&gt;PositionedNode&lt;/a&gt;, one thing I really wanted is to be able to handle other units than just pixels. In order to do that, some conversions are needed. To make this easier, I developed a helper class named CssLength.
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
Converting from one unit to the other can be tricky. The conversion depends on quite a few things (mostly the way font size is set in the node's hierarchy in the DOM), and there is not a simple arithmetic way to convert ems to pixels for example. This class provides a factor calculation allowing easy conversion, by using the browser's own CSS engine. It also provides a few helper methods, for example to extract the unit from the CSS string, to add or substract pixels or other units from the value, etc...
&lt;/div&gt;

&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre;font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; oCssLength = &lt;span class="kwrd"&gt;new&lt;/span&gt; gslb.CssLength( &lt;span class="str"&gt;"2.2em"&lt;/span&gt; );

oCssLength.addPixels( 150 );

document.getElementById( &lt;span class="str"&gt;"divTest"&lt;/span&gt; ).style.left
  = oCssLength.toString();
&lt;/div&gt;
&lt;div class="gslb_rsbDivLegend"&gt;
Creating and working with a CSS length instance
&lt;/div&gt;

&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
More information about the &lt;a href="http://www.galasoft-lb.ch/myjavascript/WebControls/css-length.html"&gt;CssLength&lt;/a&gt; class.
&lt;/div&gt;
&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=104747"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=104747" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://blog.galasoft.ch/aggbug/104747.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://blog.galasoft.ch/archive/2007/01/27/104747.aspx</guid>
            <pubDate>Sun, 28 Jan 2007 10:49:00 GMT</pubDate>
            <wfw:comment>http://blog.galasoft.ch/comments/104747.aspx</wfw:comment>
            <comments>http://blog.galasoft.ch/archive/2007/01/27/104747.aspx#feedback</comments>
            <wfw:commentRss>http://blog.galasoft.ch/comments/commentRss/104747.aspx</wfw:commentRss>
            <trackback:ping>http://blog.galasoft.ch/services/trackbacks/104747.aspx</trackback:ping>
        </item>
        <item>
            <title>DHTML effect: Positioning</title>
            <link>http://blog.galasoft.ch/archive/2007/01/15/103659.aspx</link>
            <description>&lt;div class="gslb_rsbDivParagraph"&gt;
Continuing to clean up the DHTML effects I use on my site (see my &lt;a href="http://geekswithblogs.net/lbugnion/archive/2007/01/06/102939.aspx"&gt;previous post&lt;/a&gt;), I published a &lt;a href="http://www.galasoft-lb.ch/myjavascript/WebControls/positioned-node.html"&gt;Positioning and Scrolling effect&lt;/a&gt;. It's quite handy, in that it allows to easily keep a DOM node (DIV, ...) in sight of the user at all times. This can be used, for example, for a "floating menu" like I have on my &lt;a href="http://www.galasoft-lb.ch"&gt;main page&lt;/a&gt;.
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;

The DOM node moves with a variable speed. What I especially like in the way this effect is implemented is that the user can specify his own function to calculate the speed of the DOM node according to the distance to the target position. Of course I provide a default function, which is a factor of the square of the distance. This way, the Node "glides" smoothly to the position.
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
The Node can be repositioned either manually by calling a method, or when the user scrolls the page. Additionally, it can be pinned in both axis separately, so that it stops repositioning itself.
&lt;/div&gt;
&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=103659"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=103659" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://blog.galasoft.ch/aggbug/103659.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://blog.galasoft.ch/archive/2007/01/15/103659.aspx</guid>
            <pubDate>Tue, 16 Jan 2007 09:38:00 GMT</pubDate>
            <wfw:comment>http://blog.galasoft.ch/comments/103659.aspx</wfw:comment>
            <comments>http://blog.galasoft.ch/archive/2007/01/15/103659.aspx#feedback</comments>
            <wfw:commentRss>http://blog.galasoft.ch/comments/commentRss/103659.aspx</wfw:commentRss>
            <trackback:ping>http://blog.galasoft.ch/services/trackbacks/103659.aspx</trackback:ping>
        </item>
        <item>
            <title>DHTML effect: Fading</title>
            <link>http://blog.galasoft.ch/archive/2007/01/06/102939.aspx</link>
            <description>&lt;div class="gslb_rsbDivParagraph"&gt;
I am working on a new addition to my RealSimpleBlog control (more about that later), and that gives me the occasion to clean up a few DHTML effects I have on my website. The goal is to make a JavaScript library, which, contrarily to the well known prototype.js or others, should be lean and modular, and use advanced JavaScript programming technique while sticking to accepted best practices for JavaScript programming (quite a program...
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
To achieve this, I have one JavaScript file per effect (this allows choosing precisely which script code you want to send to the web client). Effects are added to a given DOM node (typically a DIV, but that could be any other node) simply by creating a new instance of a JavaScript object and passing the DOM node to it. Additionally, options can be defined in a literal object, which allows them to be totally optional.
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
Of course, all the effects are cumulative, so a given DOM node can have as many effects as wanted (though good taste will probably limit the number of effects :-)
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;

The first effect I am publishing is a &lt;a href="http://www.galasoft-lb.ch/myjavascript/WebControls/faded-node.html"&gt;fading effect&lt;/a&gt;, where a given node's opacity changes smoothly from one minimum value to a maximum value and back. Since opacity is unfortunately not handled in a standard way by the web browsers yet, only IE and Mozilla (Firefox, etc...) browsers have been fully tested. If you experience problems with this effect, please &lt;a href="http://www.galasoft-lb.ch/contact_en.html"&gt;contact me&lt;/a&gt; with details.
&lt;/div&gt;
&lt;div class="gslb_rsbDivParagraph"&gt;
&lt;span style="font-weight: bold;"&gt;Note: &lt;/span&gt; For opacity to work in Internet Explorer, it is necessary to set either "position: absolute" or a "float" value. If other positioning attributes are used, the opacity settings are &lt;a href="http://www.mandarindesign.com/opacity.html" target="_blank"&gt;ignored by IE&lt;/a&gt;. Firefox, however, doesn't have this limitation. That can be a real bother!
&lt;/div&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre;font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; oOptions = { iMinimum : 10,
                 iMaximum : 90,
                 iDeltaFade : 2,
                 iTimerMilliseconds : 15,
                 bRemoveAfterFade : &lt;span class="kwrd"&gt;true&lt;/span&gt; };


&lt;span class="kwrd"&gt;var&lt;/span&gt; oFadedNode
  = &lt;span class="kwrd"&gt;new&lt;/span&gt; gslb.FadedNode( document.getElementById( &lt;span class="str"&gt;"divLogo"&lt;/span&gt; ), oOptions );

(with:)

&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="divLogo"&lt;/span&gt;
     &lt;span class="attr"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;="filter: alpha(opacity=50);
            -moz-opacity: 0.5;
            display: block;
            float: center;"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;="http://www.galasoft-lb.ch/logo/smallhead.gif"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="gslb_rsbDivLegend"&gt;
Creating a fading node
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=102939"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=102939" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://blog.galasoft.ch/aggbug/102939.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://blog.galasoft.ch/archive/2007/01/06/102939.aspx</guid>
            <pubDate>Sun, 07 Jan 2007 10:14:00 GMT</pubDate>
            <wfw:comment>http://blog.galasoft.ch/comments/102939.aspx</wfw:comment>
            <comments>http://blog.galasoft.ch/archive/2007/01/06/102939.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://blog.galasoft.ch/comments/commentRss/102939.aspx</wfw:commentRss>
            <trackback:ping>http://blog.galasoft.ch/services/trackbacks/102939.aspx</trackback:ping>
        </item>
    </channel>
</rss>