<?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>Mediatomics &#187; javascript</title>
	<atom:link href="http://www.mediatomics.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mediatomics.com</link>
	<description>Online communication</description>
	<lastBuildDate>Sat, 30 Apr 2011 08:06:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Every developer his own playground</title>
		<link>http://www.mediatomics.com/2009/02/22/every-developer-his-own-playground/</link>
		<comments>http://www.mediatomics.com/2009/02/22/every-developer-his-own-playground/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 10:49:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.mediatomics.com/?p=17</guid>
		<description><![CDATA[Almost every web user will be familiar with one or more of the many widgets offered by Google. One of the most famous is probably Google Maps. Google Maps has currently already been implemented on a vast number of websites as a location or navigation tool. Every developer sooner or later ends up in a situation in ]]></description>
			<content:encoded><![CDATA[<p>Almost every web user will be familiar with one or more of the many widgets offered by Google. One of the most famous is probably <a href="http://maps.google.com" target="_blank">Google Maps</a>. Google Maps has currently already been implemented on a vast number of websites as a location or navigation tool.</p>
<p>Every developer sooner or later ends up in a situation in which he is confronted with a new interesting technique and/or its corresponding API. This always happens on a moment in time where you simply do not have the time to really get into it, or where you have the time but simply do not know where to start. The books have not yet been published, or they have been published, but you&#8217;re not much of a reader; you&#8217;re the &#8216;doing&#8217; type. Nobody will ever do you a favor by getting you a book, &#8230; any book.</p>
<p><span id="more-17"></span></p>
<p>In such a situation one  needs an environment in which you can experiment at your heart&#8217;s content without running the risk of ruining something. An environment in which it is always possible to return to the original situation. An environment which allows you to re-use, extend and change relevant code. We now have such an environment.</p>
<p>Mid January Google introduced its <a href="http://code.google.com/apis/ajax/playground/" target="_blank">&#8216;AJAX playground&#8217;</a>; the place for freely playing and experimenting with all kinds of functionality Google has been offering for some time now. The place for getting acqainted with the underlying code, for &#8216;stealing&#8217; code, and &#8211; foremost &#8211; for gaining an understanding of the multiple Google API&#8217;s.</p>
<h2>Visualisation</h2>
<p>The playground offers opportunities for freely playing around with attractive and often more usable ways of displaying data. Not only does the API offer easier, more attractive and dynamic data display. The API also offers you more interactive data display, for instance in socalled &#8221;Motion Charts&#8217;. With these one may display data in a way in which dependencies and developments become more obvious using sliders and animation. Next to all this the Google API offers multiple ways to enhance interactivity in tables.</p>
<h2>Google Maps</h2>
<p>A frequently used API is of course Google Maps. It is hard nowadays to imagine a web without Google Maps. The playground shows some of the possibilities Google Map offers. Of course you may play around with alle the parameters and methods on offer.</p>
<h2>Google Earth</h2>
<p>Perhaps less used, but definitely not less interesting, is the API involved with <a href="http://code.google.com/apis/earth/" target="_blank">Google Earth</a>. To use this API, one needs the  <a href="http://code.google.com/apis/earth/" target="_blank">Google Earth Plugin</a> installed on its computer.</p>
<h2>Javascript libraries</h2>
<p>The Google API&#8217;s can be quite easily integrated with existing libraries like jQuery, Prototype, Dojo etc. The playground makes the first steps in this area easy to take.</p>
<h2>Code &#8216;jatten&#8217;</h2>
<p>Through the &#8216;Code Menu&#8217; in the upper right corner of the interface, you are offered multiple ways of reusing and adapting source code to fit your own demands. Because the playground interface has its limitations, the export functions are a great way to take the examples and code to your own local development environment.</p>
<h2>Conclusions</h2>
<p>Google definitely reaches out to the development community with this <a href="http://code.google.com/apis/ajax/playground/">&#8216;AJAX playground&#8217;</a>. Businesses could definitely profit from what Google has on offer with all these API&#8217;s. The playground is a nice way of discovering what it exactly is that Google offers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mediatomics.com/2009/02/22/every-developer-his-own-playground/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xHTML strict and opening a url in a new window</title>
		<link>http://www.mediatomics.com/2008/10/12/xhtml-strict-and-opening-a-url-in-a-new-window/</link>
		<comments>http://www.mediatomics.com/2008/10/12/xhtml-strict-and-opening-a-url-in-a-new-window/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 10:55:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[webstandards]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.mediatomics.com/?p=23</guid>
		<description><![CDATA[If you need to validate your web pages against the xHTML Strict DTD, you will run into some practical problems. One of these problems is that according to this DTD, the target attribute for a-elements is deprecated. So how then does one create links that will open a web page in a new window? The ]]></description>
			<content:encoded><![CDATA[<p>If you need to validate your web pages against the xHTML Strict DTD, you will run into some practical problems. One of these problems is that according to this DTD, the target attribute for a-elements is deprecated. So how then does one create links that will open a web page in a new window?</p>
<p>The solution is found in a combination of Javascript and CSS. Basically it&#8217;s quite simple: we provide every link that needs to be opened in a new window with a class. Then we use Javascript to track down all these links and assign the appropriate behaviour. Let&#8217;s see how this works.</p>
<h2>The CSS part</h2>
<p>We apply a separate class to all links to be opened in a new window. We may call this class something like &#8216;newwin&#8217;, so we get some indication on its purpose. If needed we may add some visual styling tothis class, but the principal purpose of the class is to identify these links so we can add some onclick behaviour.</p>
<pre>&lt;a href="http://www.somewebsite.com" class="newwin"&gt;Some website&lt;/a&gt;</pre>
<p><span id="more-23"></span></p>
<h2>The Javascript part</h2>
<p>We include a function in the head of the document that makes it possible to open a url in a new window.</p>
<pre>&lt;script type="text/javascript" src="openstrict.js"&gt;&lt;/script&gt;</pre>
<p>We see the following when we look at the file &#8217;openstrict.js&#8217;.</p>
<pre>function looplinks(){
   var links = document.getElementsByTagName("a");
   if(links){
      for (var i = 0; i &lt; links.length ;i++){
         if(links[i].className == "newwin"){
            links[i].onclick = openstrict;
         }
      }
   }
}
function openstrict(){
   window.open(this);
   return false;
}</pre>
<p>The function &#8217;looplinks()&#8217; is called at the end of the xHTML document. This function looks up all links in the document and checks whether a link has a class &#8216;newwin&#8217; added to it. If so, an onclick event is defined for the link. In this onclick event, the function  &#8216;openstrict()&#8217; is called.</p>
<p>The function &#8217;openstrict()&#8217; catches the clicked element and uses the value of its href attribute to open this url in a new window, using the Javascript method window.open. We add the &#8216;return false&#8217; statement to prevent opening the url in the current window.</p>
<p>The last thing left to do, is calling  &#8216;looplinks()&#8217;. We do this by placing the following just before the closing body tag.</p>
<pre>&lt;script type="text/javascript"&gt;looplinks();&lt;/script&gt;</pre>
<p>That&#8217;s it. No rocket science, valid xHTML Strict and an easy way to open links in a new window. Tested under Windows  in IE6, IE7, Firefox 2 en 3 and Safari 3.1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mediatomics.com/2008/10/12/xhtml-strict-and-opening-a-url-in-a-new-window/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

