<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>www.netsi.dk &#187; javascript</title>
	<atom:link href="http://www.netsi.dk/wordpress/index.php/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.netsi.dk/wordpress</link>
	<description>&#34;The internet is just a layer on the real world&#34; (don&#039;t forget that!)</description>
	<lastBuildDate>Sat, 04 Sep 2010 10:53:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>JSON viewer &#8211; comes handy</title>
		<link>http://www.netsi.dk/wordpress/index.php/2010/05/14/json-viewer-comes-handy/</link>
		<comments>http://www.netsi.dk/wordpress/index.php/2010/05/14/json-viewer-comes-handy/#comments</comments>
		<pubDate>Fri, 14 May 2010 13:29:27 +0000</pubDate>
		<dc:creator>netsi</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://www.netsi.dk/wordpress/index.php/2010/05/14/json-viewer-comes-handy/</guid>
		<description><![CDATA[Today I came across a JSON file, hmm… I love the opportunities that JSON gives you as a developer, but it is very compressed and not especially human friendly. Unlike XML, which on the other hand calls for a lot of coding inside a program to convert it into anything other that just data. JSON can contain actual code, functions, objects and ofcause data.
I then googled for JSON viewer and [...]]]></description>
			<content:encoded><![CDATA[<p>Today I came across a JSON file, hmm… I love the opportunities that JSON gives you as a developer, but it <strong>is</strong> very compressed and not especially human friendly. Unlike XML, which on the other hand calls for a lot of coding inside a program to convert it into anything other that just data. JSON can contain actual code, functions, objects and ofcause data.</p>
<p>I then googled for JSON viewer and found a very cool tool! <a title="Here you can find the JSON viewer" href="http://jsonviewer.codeplex.com/" target="_blank">“JSON viewer” at codeplex.com</a>. It comes in three variants:</p>
</p>
<ol>
<li>A standalone viewer &#8211; JsonView.exe (view <a title="Example screenshoot, viewing JSON in standalone version" href="http://screencast.com/t/ZjllMmU1YWQt" target="_blank">example screenshoot</a>)      <br />No doubt – I found this very easy to use. Click to start, paste JSON and view it…      </li>
<li>A plugin for Fiddler 2 (http://www.fiddler2.com/) &#8211; FiddlerJsonViewer.dll     <br />Well, I do not have it installed.      </li>
<li>A visualizer for Visual Studio 2005 &#8211; JsonVisualizer.dll     <br />I followed the instructions (though in VS2008), but never really got to a point where I saw the visualizer appear. Perhaps I just dont get the concept of visualizer.</li>
</ol>
<p>I will not go any further into how to install it, I believe that the readme.txt inside the ZIP file should explain that part. And how to use it – well, try downloading this JSON: <a title="http://www.netsi.dk/wordpress/wp-content/uploads/2010/05/exampleJSON.js" href="http://www.netsi.dk/wordpress/wp-content/uploads/2010/05/exampleJSON.js">http://www.netsi.dk/wordpress/wp-content/uploads/2010/05/exampleJSON.js</a> and play around with it!</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2010/05/14/json-viewer-comes-handy/" target="_blank"><img src="http://www.netsi.dk/wordpress/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2010/05/14/json-viewer-comes-handy/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.netsi.dk/wordpress/index.php/2010/05/14/json-viewer-comes-handy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using jQuery UI, is it easy?</title>
		<link>http://www.netsi.dk/wordpress/index.php/2010/02/21/using-jquery-ui-is-it-easy/</link>
		<comments>http://www.netsi.dk/wordpress/index.php/2010/02/21/using-jquery-ui-is-it-easy/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 11:10:33 +0000</pubDate>
		<dc:creator>netsi</dc:creator>
				<category><![CDATA[Is it easy?]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.netsi.dk/wordpress/index.php/2010/02/21/using-jquery-ui-is-it-easy/</guid>
		<description><![CDATA[The javascript API jQuery is a very powerfull libray which have revolutionised the use of clientside javascript in browsers. Along the side of jQuery exists jQuery UI a library of strongly customizable widgets. It offers a wide range of &#34;easy-to-implement&#34; widgets for your website. I will try in this post to implement a datepicker and conclude in the end if it is easy!
Read the article and post your comments here [...]]]></description>
			<content:encoded><![CDATA[<p>The javascript API jQuery is a <strong>very</strong> powerfull libray which have revolutionised the use of clientside javascript in browsers. Along the side of jQuery exists <strong>jQuery UI</strong> a library of strongly customizable widgets. It offers a wide range of &quot;easy-to-implement&quot; widgets for your website. I will try in this post to implement a <code>datepicker</code> and conclude in the end if it is easy!
<p>Read <a title="Read the article [Using jQuery UI, is it easy]" href="http://www.netsi.dk/showcases/jQuery_UI.html" target="_blank">the article</a> and post your comments here on this page.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2010/02/21/using-jquery-ui-is-it-easy/" target="_blank"><img src="http://www.netsi.dk/wordpress/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2010/02/21/using-jquery-ui-is-it-easy/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.netsi.dk/wordpress/index.php/2010/02/21/using-jquery-ui-is-it-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript intellisense in Microsoft Visual Studio 2008 (VS2008)</title>
		<link>http://www.netsi.dk/wordpress/index.php/2010/02/09/javascript-intellisense-in-microsoft-visual-studio-2008-vs2008/</link>
		<comments>http://www.netsi.dk/wordpress/index.php/2010/02/09/javascript-intellisense-in-microsoft-visual-studio-2008-vs2008/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 21:57:22 +0000</pubDate>
		<dc:creator>netsi</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[intellisence]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Microsoft Visual studio 2008]]></category>

		<guid isPermaLink="false">http://www.netsi.dk/wordpress/index.php/2010/02/09/javascript-intellisense-in-microsoft-visual-studio-2008-vs2008/</guid>
		<description><![CDATA[When I first saw that Microsoft Visual Studio 2008 (VS2008) started to allow for intellisence on javascript I was happy! Not many seconds after that my suspicious old mind saw some problems, one of them was the fact that the vast amount of documentation would follow the javascript files making them too big and slow down pages using them.
The intellisense got smarter!
The way that the intellisense got smarter is that [...]]]></description>
			<content:encoded><![CDATA[<p><em>When I first saw that Microsoft Visual Studio 2008 (VS2008) started to allow for intellisence on javascript I was happy! Not many seconds after that my suspicious old mind saw some problems, one of them was the fact that the vast amount of documentation would follow the javascript files making them too big and slow down pages using them.</em></p>
<h3>The intellisense got smarter!</h3>
<p>The way that the intellisense got smarter is that VS2008 <strong>allows you to have the documentation in a seperate file</strong>. That way your main code will not be “heavy” for browsers to use – only at development time will the “-vsdoc” documentation file be used! </p>
<p>VS2008 will search for documentation in 3 predefined files – 3 patterns will be searched for: If you have a library, say &quot;<strong>mylibrary.js</strong>&quot;, VS2008 will search for documentation in the same directory in this order</p>
<ol>
<li>&quot;mylibrary<strong>-vsdoc</strong>.js&quot;, then if that is not found, a search for&#8230; </li>
<li>&quot;mylibrary<strong>.debug</strong>.js&quot;, then if that is not found, a search for&#8230; </li>
<li>&quot;mylibrary.js&quot; </li>
</ol>
<p>So if you program a javascript library you can add VS2008 intellisense code in a version named in one of the two ways shown above (or embedded in the main library), and then save it in the same folder as the actual library. This will introduce help on methodes in the library. </p>
<p>If no intellisence appers as you type try updating: “Edit &gt; IntelliSense &gt; Update Javascript IntelliSence (Ctrl+Shift+J)”. </p>
<p>To get this feature you will need to install this <a title="A hotfix for VS2008 which adds the descriped feature" href="http://code.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736" target="_blank">hotfix for VS2008</a>.</p>
<p>You can see a description of how to use the &quot;-vsdoc&quot; part in jQuery here:    <br /><a title="Rich IntelliSense for jQuery" href="http://blogs.msdn.com/webdevtools/archive/2008/10/28/rich-intellisense-for-jquery.aspx" target="_blank">Rich IntelliSense for jQuery</a>.</p>
<p>Below you can find links to related posts/articles – one of them “<a title="See how you can write your own javascript docs for VS2008" href="http://weblogs.asp.net/bleroy/archive/2007/04/23/the-format-for-javascript-doc-comments.aspx" target="_blank">The format for JavaScript doc comments</a>” I thing is very important as it is a guide to how <strong>you</strong> add documentation (and intellisence) to <strong>your own</strong> javascript code. So now there are more than one argument to start documenting your code!</p>
<p>Happy documenting!</p>
<p>/Sten</p>
<p><strong>Related articles</strong></p>
<ul>
<li><a title="A guide to using Intellisence with the jQuery javascript library" href="http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx" target="_blank">jQuery Intellisense in VS 2008</a> </li>
<li><a title="JScript IntelliSense FAQ" href="http://blogs.msdn.com/webdevtools/archive/2008/11/18/jscript-intellisense-faq.aspx">JScript IntelliSense FAQ</a> </li>
<li><a title="See how you can write your own javascript docs for VS2008" href="http://weblogs.asp.net/bleroy/archive/2007/04/23/the-format-for-javascript-doc-comments.aspx" target="_blank">The format for JavaScript doc comments</a> </li>
<li><a title="A hotfix for VS2008 which adds the descriped feature" href="http://code.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736" target="_blank">Hotfix for VS2008</a> </li>
</ul>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2010/02/09/javascript-intellisense-in-microsoft-visual-studio-2008-vs2008/" target="_blank"><img src="http://www.netsi.dk/wordpress/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2010/02/09/javascript-intellisense-in-microsoft-visual-studio-2008-vs2008/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.netsi.dk/wordpress/index.php/2010/02/09/javascript-intellisense-in-microsoft-visual-studio-2008-vs2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Closure javascript API &#8211; good or bad?</title>
		<link>http://www.netsi.dk/wordpress/index.php/2009/11/14/google-closure-javascript-api-good-or-bad/</link>
		<comments>http://www.netsi.dk/wordpress/index.php/2009/11/14/google-closure-javascript-api-good-or-bad/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 20:08:47 +0000</pubDate>
		<dc:creator>netsi</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[Google Colsure]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.netsi.dk/wordpress/index.php/2009/11/14/google-closure-javascript-api-good-or-bad/</guid>
		<description><![CDATA[Since I first started to juse jQuery javascript API I have been a happy programmer! Things like cross browser, easy widget implementation and animation were suddently very easy to use. It was fast to implement, ran fast and as mentioned were rock solid accross browsers on various platforms! Finally: It started a trend of worldwide unity amoung javascript developers – people very moving as a group.
Javascript frameworks – a litle [...]]]></description>
			<content:encoded><![CDATA[<p>Since I first started to juse <a title="jQuery javascript API" href="http://jquery.com/" target="_blank">jQuery javascript API</a> I have been a happy programmer! Things like cross browser, easy widget implementation and animation were suddently very easy to use. It was fast to implement, ran fast and as mentioned were rock solid accross browsers on various platforms! Finally: It started a trend of worldwide unity amoung javascript developers – people very moving as a group.</p>
<p><strong>Javascript frameworks – a litle background      <br /></strong>Last year Microsoft realized that <a title="jQuery javascript API" href="http://jquery.com/" target="_blank">jQuery</a> was a very powerfull and solid javascript framework, the simply decided to adapt it and use it as their prefered javascript API. Not a thing which done often by such a big player! The company which perhaps has as many people who hate it as it has followers realized that open source code is something to respect and adapt!</p>
<p><a title="Google Colsure Javascript Library" href="http://closure-library.googlecode.com/svn/trunk/closure/goog/docs/index.html" target="_blank">Google Colsure</a> on the other hand – what is it? As I understand the framework is something which Google has developed for internal use, and now has opened up, so that everyone are free to use it. I must admit that I am not totally into all the terms of use and the history of this framework. However IMHO:</p>
<blockquote><p><font style="background-color: #ffffff">
<p>We don’t need Google to put one more player on the field of javascript frameworks! When it comes to javascript frameworks we need the unity amoung javascript developers – and a framework like jQuery provides all the extensibility for any Google special needs.&#160; </p>
<p>   </font></p></blockquote>
<p><strong>What to do with “the new Microsoft” <img src='http://www.netsi.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ?      <br /></strong>It would be unrealistic to expect Google to “drop” its <a title="Google Colsure Javascript Library" href="http://closure-library.googlecode.com/svn/trunk/closure/goog/docs/index.html" target="_blank">Google Colsure</a> framework, but us &#8211; the javascript developers &#8211; might put presure on Google (the new Microsoft?). I for one do not need another javascript framework. So I will continue using jQuery.</p>
<p>I do not see Google as the new Microsoft – and Microsoft is not a bad company in my eyes. What however is bad is when <strong>one</strong> company is too big and can ignore other players without getting into trouble. Google is probertly not trying to push other javascript frameworks out of the field… Right Google? <img src='http://www.netsi.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Perhaps Google could try to convert their ideas into extentions/plug-ins to <a title="jQuery javascript API" href="http://jquery.com/" target="_blank">jQuery</a>?</p>
<p><strong>Other opinions about Google Closure      <br /></strong>Using <a title="TweetDeck: a simple and fast way to experience Twitter." href="http://www.tweetdeck.com/beta/" target="_blank">TweetDesk</a> I set up a search for “Closure Library” to follow the tweets about the Google Closure Library. Just followed one of them to: <a title="http://www.sitepoint.com/blogs/2009/11/12/google-closure-how-not-to-write-javascript/" href="http://www.sitepoint.com/blogs/2009/11/12/google-closure-how-not-to-write-javascript/">http://www.sitepoint.com/blogs/2009/11/12/google-closure-how-not-to-write-javascript/</a></p>
<p><a title="Visit the site with the article: &quot;Google Closure: How not to write JavaScript&quot;" href="http://www.sitepoint.com/blogs/2009/11/12/google-closure-how-not-to-write-javascript/" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.netsi.dk/wordpress/wp-content/uploads/2009/11/image4.png" width="640" height="477" /></a> </p>
<p>That article was written by <a title="Read about Kevin Yank on www.sitepoint.com" href="http://www.sitepoint.com/articlelist/48" target="_blank">Kevin Yank</a> and he referes to some <a title="Google Colsure Javascript Library" href="http://closure-library.googlecode.com/svn/trunk/closure/goog/docs/index.html" target="_blank">Google Colsure</a> critism spoken by <a title="Visit the site of Dmitry Baranovskiy, the creator of the Raphaël and gRaphaël JavaScript libraries" href="http://dmitry.baranovskiy.com/" target="_blank">Dmitry Baranovskiy</a>. I myself have coded many lines of javascript and learned things just by reading this article! I also saw some scary “mistakes” which Dmitry pointed out in the new Google Closure framework. One of them was testing if a <code>var</code> was of the type <code>String</code> (From <a href="http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/base.js?r=2" target="_blank">base.js</a>, line 742):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">goog.<span style="color: #660066;">isString</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>val<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">typeof</span> val <span style="color: #339933;">==</span> <span style="color: #3366CC;">'string'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>
  <br />The problem with that method (<code>isString</code>) is simply that it fails if you call it with a String object! Not cool! If you call it like this: <code>goog.isString(new String(‘My string’))</code> it will return <code>false</code>!</p>
<p>Ofcause nothing is perfect, and the points by <a title="Visit the site of Dmitry Baranovskiy, the creator of the Raphaël and gRaphaël JavaScript libraries" href="http://dmitry.baranovskiy.com/" target="_blank">Dmitry Baranovskiy</a> could easily be changed as a normal bug is fixed in any javascript framework. What scares me is the fact that many people seem to think that Google equals perfect, and if many people are non-sceptical about things developed by Google (Yahoo, Microsoft or anyone!) then perhaps they will leave jQuery and start using <a title="Google Colsure Javascript Library" href="http://closure-library.googlecode.com/svn/trunk/closure/goog/docs/index.html" target="_blank">Google Colsure</a> Library… I hope not!</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/11/14/google-closure-javascript-api-good-or-bad/" target="_blank"><img src="http://www.netsi.dk/wordpress/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/11/14/google-closure-javascript-api-good-or-bad/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.netsi.dk/wordpress/index.php/2009/11/14/google-closure-javascript-api-good-or-bad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Need custom fonts online? Try Cuf&#243;n!</title>
		<link>http://www.netsi.dk/wordpress/index.php/2009/10/29/need-custom-fonts-online-try-cufn/</link>
		<comments>http://www.netsi.dk/wordpress/index.php/2009/10/29/need-custom-fonts-online-try-cufn/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 21:56:37 +0000</pubDate>
		<dc:creator>netsi</dc:creator>
				<category><![CDATA[inspirovation]]></category>
		<category><![CDATA[Cufón]]></category>
		<category><![CDATA[custom fonts]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.netsi.dk/wordpress/?p=127</guid>
		<description><![CDATA[I was tired of sIFR (flash based custom fonts) and decided to google for another soloution to adding custom (non web-standard fonts) to a webpage. I came across “Cufón” and decided to set up a target: If it is to be considered easy and out-of-the-box, the framework should be able to implement in 45 minutes!
I succeded in 31 minutes – which included setting up a simple “documentation”/article about how I [...]]]></description>
			<content:encoded><![CDATA[<p>I was tired of sIFR (flash based custom fonts) and decided to google for another soloution to adding custom (non web-standard fonts) to a webpage. I came across “Cufón” and decided to set up a target: If it is to be considered easy and out-of-the-box, the framework should be able to implement <strong>in 45 minutes!</strong></p>
<p>I succeded in 31 minutes – which included setting up a simple “documentation”/article about how I did! Now that article/webpage has been brushed up (making it more nice to look at) and I can think that it is worth a visit!</p>
<p>Find it on my domain here: <a title="A page showing how simple it is to setup custom fonts on your webpage using Cufón!" href="http://www.netsi.dk/showcases/cufon.html" target="_blank">http://www.netsi.dk/showcases/cufon.html</a>, it also has a few relevant links. Should you feel the need to submit comments about that page, feel free to do it here.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/10/29/need-custom-fonts-online-try-cufn/" target="_blank"><img src="http://www.netsi.dk/wordpress/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/10/29/need-custom-fonts-online-try-cufn/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.netsi.dk/wordpress/index.php/2009/10/29/need-custom-fonts-online-try-cufn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get map using Google Static Maps</title>
		<link>http://www.netsi.dk/wordpress/index.php/2009/08/16/get-map-using-google-static-maps/</link>
		<comments>http://www.netsi.dk/wordpress/index.php/2009/08/16/get-map-using-google-static-maps/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 21:13:01 +0000</pubDate>
		<dc:creator>netsi</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.netsi.dk/wordpress/?p=81</guid>
		<description><![CDATA[You probertly know Google Maps and the API allowing you to embed maps with your information shown on the map. Google also offers a simpel API which allows you to plot simple maps just using an URL. The URL then has some parameters specifying things like zoom level, type of map and center of it.
Though simpel to setup &#8211; those parameters – I have made a simple web application which will [...]]]></description>
			<content:encoded><![CDATA[<p>You probertly know Google Maps and the API allowing you to embed maps with your information shown on the map. Google also offers a <a target="_blank" href="http://code.google.com/intl/da/apis/maps/documentation/staticmaps/" title="Google Static Maps API">simpel API</a> which allows you to plot simple maps just using an URL. The URL then has some parameters specifying things like zoom level, type of map and center of it.</p>
<p>Though simpel to setup &#8211; those parameters – I have made a simple web application which will give you the URL you need to get the map you want.</p>
<p>Try it here: <a href="http://www.netsi.dk/showcases/getmap.html" title="http://www.netsi.dk/showcases/getmap.html">http://www.netsi.dk/showcases/getmap.html</a></p>
<p><a href="http://www.netsi.dk/wordpress/wp-content/uploads/2009/08/image2.png" rel="lightbox[81]"><img border="0" src="http://www.netsi.dk/wordpress/wp-content/uploads/2009/08/image-thumb2.png" alt="image" style="display: inline; border: 0px" title="image" height="127" width="596" /></a></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/08/16/get-map-using-google-static-maps/" target="_blank"><img src="http://www.netsi.dk/wordpress/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/08/16/get-map-using-google-static-maps/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.netsi.dk/wordpress/index.php/2009/08/16/get-map-using-google-static-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript i XSLT &#8211; et gode eller et onde?</title>
		<link>http://www.netsi.dk/wordpress/index.php/2009/08/11/javascript-i-xslt-et-gode-eller-et-onde/</link>
		<comments>http://www.netsi.dk/wordpress/index.php/2009/08/11/javascript-i-xslt-et-gode-eller-et-onde/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 16:24:02 +0000</pubDate>
		<dc:creator>netsi</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://www.netsi.dk/wordpress/?p=78</guid>
		<description><![CDATA[Jeg har en del viden indenfor javascript og nu hvor XSLT også er noget jeg arbejder med er det åbenlyst at kombinere disse to teknologier.
Jeg har dog kollegaer der mener at det er en dum ide &#8211; at blande disse to ting. De mener at når man transformerer data så er man ude i &#8220;view&#8221; delen af Model View Control løsning, og der skal der ikke være kode (udover XSLTen).
Jeg [...]]]></description>
			<content:encoded><![CDATA[<p>Jeg har en del viden indenfor javascript og nu hvor XSLT også er noget jeg arbejder med er det åbenlyst at kombinere disse to teknologier.</p>
<p>Jeg har dog kollegaer der mener at det er en dum ide &#8211; at blande disse to ting. De mener at når man transformerer data så er man ude i &#8220;view&#8221; delen af Model View Control løsning, og der skal der ikke være kode (udover XSLTen).</p>
<p>Jeg kan godt se at de har lidt ret, men mener på den anden side at man bare udvider de ting som XSLT kan. Hvis man sørger for at have solid javascript kode og kun benytter den som en støtte til allerede eksisterende XSLT funktionalitet kan der ikke være noget galt i det.</p>
<p>Hvad synes du?</p>
<p>Eksempler på sider der omhandler emnet:</p>
<ul>
<li><a href="http://www.hinnerup.net/2008/03/05/xslt_msxsl_script/">XSLT konvertering til store/små bogstaver</a></li>
<li><a target="_blank" href="http://www.ibm.com/developerworks/xml/library/x-tipxsltjs/">Tip: Call JavaScript from an XSLT style sheet</a></li>
<li><a target="_blank" href="http://dev.ektron.com/kb_article.aspx?id=482">INFO:XSLT: Using JavaScript in XSLT</a></li>
</ul>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/08/11/javascript-i-xslt-et-gode-eller-et-onde/" target="_blank"><img src="http://www.netsi.dk/wordpress/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/08/11/javascript-i-xslt-et-gode-eller-et-onde/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.netsi.dk/wordpress/index.php/2009/08/11/javascript-i-xslt-et-gode-eller-et-onde/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the right contents when using Dynamicweb CMS templates</title>
		<link>http://www.netsi.dk/wordpress/index.php/2009/06/13/getting-the-right-contents-when-using-dynamicweb-cmd-templates/</link>
		<comments>http://www.netsi.dk/wordpress/index.php/2009/06/13/getting-the-right-contents-when-using-dynamicweb-cmd-templates/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 07:04:12 +0000</pubDate>
		<dc:creator>netsi</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[dynamicweb]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://www.netsi.dk/wordpress/?p=59</guid>
		<description><![CDATA[In the CMS system I work with – Dynamicweb CMS – content is build around various templates, each containing a output from the system. The output is generated using ASP.NET and each bit of content is represented in a “tag”. For instance if you want the name of the user which has logged on the page you enter
&#60;!—@Global:Extranet.Name--&#62;
Such templates are based on HTML, it is: You create static parts of [...]]]></description>
			<content:encoded><![CDATA[<p>In the CMS system I work with – <a href="http://www.dynamicweb.dk" title="Visit the company which have created the CMS sytem called Dynamicweb CMS">Dynamicweb CMS</a> – content is build around various templates, each containing a output from the system. The output is generated using ASP.NET and each bit of content is represented in a “tag”. For instance if you want the name of the user which has logged on the page you enter</p>
<pre>&lt;!—@Global:Extranet.Name--&gt;</pre>
<p>Such templates are based on <strong>HTML</strong>, it is: You create static parts of HTML and insert tags where you want the system to insert dynamic content.</p>
<p>You might want to do something like this:</p>
<pre>...&lt;div&gt;Hi &lt;!—@Global:Extranet.Name--&gt;!&lt;/div&gt;...</pre>
<p>So far so good! But what if the user has not logged in? You will need to do one of three things:</p>
<h3>The Javascript soloution</h3>
<p>Put shortly: Using javascript to control which content is shown is basically not a good idea. But today almost anyone browsing the net has javascript turned on, and the trend (IMHO) goes towards very powerfull javascript parts. Another discussion is that: &#8220;Why give a visitor contents if you allready before you start sending information (HTML) that the content is not really relevant?&#8221;. Well, another article about that.. <img src='http://www.netsi.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Here goes:</p>
<pre>...&lt;script type="text/javascript"&gt;
if ('&lt;!—@Global:Extranet.Name--&gt;'!='') {
document.write('&lt;div&gt;Hi &lt;!—@Global:Extranet.Name--&gt;!');
}
&lt;/script&gt;...</pre>
<h3>The CSS soloution</h3>
<p>This is actually not a way which I would say always works! But the theory is that you put CSS classes  on HTML tags that are build around a classname-prefix (“customerNumber” for instance) and then add the dynamic value from Dynamicweb CMS as postfix. So if a user has logged in a classname would be for instance “customerNumber342” for a customer with the number 342. A customer who has not yet logged in would give a classname “customerNumber”. So if we by default hide the classname “customerNumber” any other classnames would be displayed! <img src='http://www.netsi.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Cute right? But the problem can rise when sometime certain Dynamicweb template tags are not replaced, even if it has no value. That way you might end up with</p>
<pre>“customerNumber&lt;!--@Global:Extranet.CustomerNumber--&gt;”</pre>
<p>That would even be invalid HTML! <img src='http://www.netsi.dk/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  Anyway here is how a CSS based soloution could be.</p>
<pre>&lt;head&gt;.. &lt;style type="text/css"&gt;
.customerNumber {display: none;}
&lt;/style&gt;
..
&lt;/head&gt;&lt;body&gt;
...
&lt;div class="customerNumber&lt;!--@Global:Extranet.CustomerNumber--&gt;"&gt;
Hi &lt;!—@Global:Extranet.Name--&gt;!
&lt;/div&gt;</pre>
<h3>The <em>If Defined </em>soloution</h3>
<p>Dynamicweb CMS offers a way to check if a tag has content, and only pass the  content within the IF-ENDIF if a tag has content.</p>
<pre>&lt;<a href="mailto:!--@If%20Defined(Global:Extranet.Name)--">!--@If Defined(Global:Extranet.Name)--</a>&gt;
&lt;div&gt;Hi &lt;!—@Global:Extranet.Name--&gt;!&lt;/div&gt;
&lt;!--@EndIf(Global:Extranet.Name)--&gt;</pre>
<pre>...&lt;div&gt;Hi &lt;!—@Global:Extranet.Name--&gt;!&lt;/div&gt;...</pre>
<p>These are just 3 ways of making workaround in Dynamicweb CMS, you could ofcause come up with more! For instance combining the javascript and CSS soloution.</p>
<h3>XSLT Templates comes to our rescue – well almost!</h3>
<p>Imagine that you build your content using XSLT: Dynamicweb CMS will build a XML document containing all the “template tag values” in a structured way. A tiny bit of this XML document might be:</p>
<pre>...&lt;Global.Extranet.Name&gt;342&lt;/Global.Extranet.Name&gt;...</pre>
<p>So this way <strong>you</strong> decide if it is relevant to produce output based on “real” values! You can use the power of XSLT/XPATH to decide what to do. An example:</p>
<pre>&lt;xsl:if test="Global.Extranet.Name!=''"&gt;
&lt;div&gt;Hi &lt;xsl:value-of select="Global.Extranet.Name" /&gt;!&lt;/div&gt;
&lt;/xsl:if&gt;</pre>
<p>All this is done <strong>before</strong> the content has been send to the client (in Dynamicweb Backend). It is a clean powerfull way to produce exactly what is needed for the page to render as wished.</p>
<h3></h3>
<h3>Nothing is perfect…</h3>
<p>When all this is said, I must warn you: <strong>The XSLT templates path is – I am sad to say – not always perfect in Dynamciweb CMS</strong>. The XML document does not always have all tags. I have some workarounds which I will write about in a later article.</p>
<p>You can see all template tags at <a href="http://templates.dynamicweb.dk/" title="Dynamicweb Template Tag Reference">templates.dynamicweb.dk</a>.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/06/13/getting-the-right-contents-when-using-dynamicweb-cmd-templates/" target="_blank"><img src="http://www.netsi.dk/wordpress/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/06/13/getting-the-right-contents-when-using-dynamicweb-cmd-templates/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.netsi.dk/wordpress/index.php/2009/06/13/getting-the-right-contents-when-using-dynamicweb-cmd-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gravatar &#8211; what is it? How to use it?</title>
		<link>http://www.netsi.dk/wordpress/index.php/2009/01/28/gravatar-what-is-it-how-to-use-it/</link>
		<comments>http://www.netsi.dk/wordpress/index.php/2009/01/28/gravatar-what-is-it-how-to-use-it/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 22:07:18 +0000</pubDate>
		<dc:creator>netsi</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[Gravatar]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[novice]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.netsi.dk/wordpress/?p=30</guid>
		<description><![CDATA[Gravatar is an image/icon which will be used whenever your e-mail is used, typically in blogs like this. You may see an example of how to retrieve gravatar using jQuery here. I wanted to write the article here &#8211; but I am too much a novice to know how to use jQuery libraries on Wordpress &#8211; so you will have to view the artical and write any comments here&#8230;
Share on [...]]]></description>
			<content:encoded><![CDATA[<p>Gravatar is an image/icon which will be used whenever your e-mail is used, typically in blogs like this. You may see an example of how to retrieve gravatar using jQuery <a href="http://www.netsi.dk/jquery/md5.html" title="An example of how to retrieve an gravatar using JQuery">here</a>. I wanted to write the article here &#8211; but I am too much a novice to know how to use jQuery libraries on Wordpress &#8211; so you will have to view the artical and write any comments here&#8230;</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/01/28/gravatar-what-is-it-how-to-use-it/" target="_blank"><img src="http://www.netsi.dk/wordpress/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/01/28/gravatar-what-is-it-how-to-use-it/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.netsi.dk/wordpress/index.php/2009/01/28/gravatar-what-is-it-how-to-use-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snippet: eval window</title>
		<link>http://www.netsi.dk/wordpress/index.php/2009/01/13/snippet-eval-window/</link>
		<comments>http://www.netsi.dk/wordpress/index.php/2009/01/13/snippet-eval-window/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 14:02:47 +0000</pubDate>
		<dc:creator>netsi</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[MSIE]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://www.netsi.dk/wordpress/?p=23</guid>
		<description><![CDATA[Here is a very usefull javascript snippet which you can put in a link in your (MSIE) browser. It opens a new window from where you can execute javascript in the context of the parent window. Very usefull! Here is the snippet code:
javascript:void(eval(&#34;var s = &#039;&#60;script type=\&#34;text/javascript\&#34;&#62;function doEval(s) { opener.eval(s);  }&#60;/script&#62;&#039;;s+=&#039;&#60;textarea rows=10 cols=80 id=source&#62;&#60;/textarea&#62;&#60;br /&#62;&#60;input type=button value=Eval onclick=\&#34;doEval(source.value)\&#34; /&#62;&#039;;window.w = window.open(&#039;&#039;,&#039;&#039;,&#039;width=700,height=210&#039;);window[&#039;w&#039;].document.write(s);window[&#039;w&#039;].document.title=&#039;Debug window&#039;&#34;))
To add this snippet to your browser follow [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a very usefull javascript snippet which you can put in a link in your (MSIE) browser. It opens a new window from where you can execute javascript in the context of the parent window. Very usefull! Here is the snippet code:</p>
<p><code>javascript:void(eval(&quot;var s = &#039;&lt;script type=\&quot;text/javascript\&quot;&gt;function doEval(s) { opener.eval(s);  }&lt;/script&gt;&#039;;s+=&#039;&lt;textarea rows=10 cols=80 id=source&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;input type=button value=Eval onclick=\&quot;doEval(source.value)\&quot; /&gt;&#039;;window.w = window.open(&#039;&#039;,&#039;&#039;,&#039;width=700,height=210&#039;);window[&#039;w&#039;].document.write(s);window[&#039;w&#039;].document.title=&#039;Debug window&#039;&quot;))</code></p>
<p>To add this snippet to your browser follow these steps:</p>
<ol>
<li>Copy the code above to the clipboard</li>
<li>Add this page to your bookmarks &#8211; <strong>in the link</strong> area.</li>
<li>Edit the bookmark, replacing the URL with the copied code on the clipboard</li>
<li>Save, while accepting any warnings about protocol</li>
</ol>
<p>Using it is simple. When you are on a website you simply &#8211; press the link just created, and you get a new window in which you may execute javascript. The script will run in the context of the original window so you may explore the DOM and any other relevant information.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/01/13/snippet-eval-window/" target="_blank"><img src="http://www.netsi.dk/wordpress/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.netsi.dk/wordpress/index.php/2009/01/13/snippet-eval-window/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.netsi.dk/wordpress/index.php/2009/01/13/snippet-eval-window/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
