<?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>All About Web &#38; Mobile Application Development &#187; Java Script</title>
	<atom:link href="http://www.londatiga.net/category/it/programming/java-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.londatiga.net</link>
	<description>All About Web &#38; Mobile Application Development</description>
	<lastBuildDate>Sat, 14 Jan 2012 16:56:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How to Add Adsense into Your Google Map API Application</title>
		<link>http://www.londatiga.net/it/how-to-add-adsense-into-your-google-map-api-application/</link>
		<comments>http://www.londatiga.net/it/how-to-add-adsense-into-your-google-map-api-application/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 16:27:34 +0000</pubDate>
		<dc:creator>lorenz</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[adsense]]></category>
		<category><![CDATA[adsense for map]]></category>
		<category><![CDATA[adsense on google map]]></category>
		<category><![CDATA[googlbar]]></category>
		<category><![CDATA[google map]]></category>
		<category><![CDATA[map ad unit]]></category>

		<guid isPermaLink="false">http://www.londatiga.net/?p=534</guid>
		<description><![CDATA[There are two Adsense for Maps products  provided by Google to monetize Google Maps API application:

Advertising alongside local bussines search result using the GoogleBar that requires your Adsense account be enabled for Adsense for Search
Advertising based on map viewport using the Maps Ad Unit that requires your AdSense account be enabled for Adsense for Content.

Advertising [...]]]></description>
			<content:encoded><![CDATA[<p>There are two <strong>Adsense for Maps</strong> products  provided by Google to monetize Google Maps API application:</p>
<ul>
<li>Advertising alongside local bussines search result using the GoogleBar that requires your Adsense account be enabled for <a href="http://www.google.com/adsense/ws-overview" target="_blank">Adsense for Search</a></li>
<li>Advertising based on map viewport using the Maps Ad Unit that requires your AdSense account be enabled for <a href="http://www.google.com/adsense/afc-online-overview" target="_blank">Adsense for Content</a>.</li>
</ul>
<p><strong>Advertising using the GoogleBar</strong></p>
<div class="wp-caption alignnone" style="width: 389px"><img title="Adsense using the GoogleBar" src="http://londatiga.net/images/adsensemap/ads1.jpg" alt="Adsense using the GoogleBar" width="379" height="220" /><p class="wp-caption-text">Adsense using the GoogleBar</p></div>
<pre class="brush: jscript; title: ;">
var map;
if (GBrowserIsCompatible()) {
    var mapOptions = {
         googleBarOptions : {
                 style : 'new',
                 adsOptions: {
                      client: 'your-publisher-id',
                      channel: 'your-ads-channel-id',
                      adsafe: 'high',
                      language: 'en'
                 }
         }
    }

    map = new GMap2(document.getElementById('map'), mapOptions);
    map.setCenter(new GLatLng(27.6648274, -81.5157535), 12);
    map.setUIToDefault();
    map.enableGoogleBar();
}
</pre>
<p>Line 06: adsense options:<br />
Line 07: your adsense publisher ID<br />
Line 08: your adsense for search channel (optional)<br />
Line 09: ad safety level (optional)<br />
Line 10: language in which to display results</p>
<p><strong>Advertising using the Maps Ad Unit</strong></p>
<div class="wp-caption alignnone" style="width: 279px"><img title="Adsense using Maps Ad Unit" src="http://londatiga.net/images/adsensemap/ads2.jpg" alt="Adsense using Maps Ad Unit" width="269" height="310" /><p class="wp-caption-text">Adsense using Maps Ad Unit</p></div>
<pre class="brush: jscript; title: ;">
var adsManagerOptions = {
  maxAdsOnMap : 2,
  style: 'your-ads-unit',
  channel: 'your-ads-channel-id'
};

var publisherID = 'your-publisher-ID';

adsManager = new GAdsManager(map, publisherID, adsManagerOptions);
adsManager.enable();
</pre>
<p>Line 01: specify ads options<br />
Line 02: maximum number of ads<br />
Line 03: your ads unit<br />
Line 04: your ads channel id<br />
Line 07: specify your publisher id<br />
Line 09: construct the  GAdsManager object<br />
Line 10: enable ads</p>
]]></content:encoded>
			<wfw:commentRss>http://www.londatiga.net/it/how-to-add-adsense-into-your-google-map-api-application/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>How to Overlay Video Using JQuery Tools and Flowplayer</title>
		<link>http://www.londatiga.net/featured-articles/how-to-overlay-video-using-jquery-tools-and-flowplayer/</link>
		<comments>http://www.londatiga.net/featured-articles/how-to-overlay-video-using-jquery-tools-and-flowplayer/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 10:07:57 +0000</pubDate>
		<dc:creator>lorenz</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[flash video]]></category>
		<category><![CDATA[flash video player]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[overlay video]]></category>
		<category><![CDATA[overlay video flowplayer]]></category>
		<category><![CDATA[overlay video javascript]]></category>
		<category><![CDATA[overlay video jquery]]></category>
		<category><![CDATA[web video player]]></category>

		<guid isPermaLink="false">http://www.londatiga.net/?p=500</guid>
		<description><![CDATA[In my previous tutorial, i&#8217;ve explained the basic usage of Flowplayer as your web video player. In this tutorial, i&#8217;ll will show you a little bit advanced usage of Flowplayer combined with Jquery Tools. JqueryTools is used to overlay video with a simple apple effect. This feature is usefull when making a video gallery, where [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a title="How to Use Flowplayer as Your Video Player (Beginner's Guide)" href="http://www.londatiga.net/it/how-to-use-flowplayer-as-your-web-video-player-beginners-guide/" target="_blank">previous tutorial</a>, i&#8217;ve explained the basic usage of <a title="Flowplayer" href="http://www.flowplayer.org" target="_blank">Flowplayer</a> as your web video player. In this tutorial, i&#8217;ll will show you a little bit advanced usage of Flowplayer combined with <a title="Jquery Tools" href="http://flowplayer.org/tools/index.html" target="_blank">Jquery Tools</a>. JqueryTools is used to overlay video with a simple<em> apple</em> effect. This feature is usefull when making a video gallery, where users directly play a video in larger size in an overlay mode without having to move to a new page.</p>
<div class="wp-caption alignnone" style="width: 408px"><img title="Overlay Video" src="http://londatiga.net/images/flowplayer2/flowplayer_overlay.jpg" alt="Overlay Video" width="398" height="314" /><p class="wp-caption-text">Overlay Video</p></div>
<p><strong><span style="text-decoration: underline;">How to Setup</span></strong></p>
<p><strong>Flowplayer</strong></p>
<p>Follow the instructions in <a title="How to Use Flowplayer as Your Video Player (Beginner's Guide)" href="http://www.londatiga.net/it/how-to-use-flowplayer-as-your-web-video-player-beginners-guide/" target="_blank">my previous tutorial</a> to setup Flowplayer</p>
<p><strong>JQuery Tools</strong></p>
<ul>
<li>Download Overlay component from Jquery Tools <a title="Download JQuery Tools" href="http://flowplayer.org/tools/index.html" target="_blank">download&#8217;s page</a> and save it as <span style="color: #800000;">jquery.tools.min.js</span>. You can download it with<span style="color: #800000;"> jQuery</span> (v1.3.2) as a single file (20.82 kb) or as a separated file (1.59 kb) if you already have jQuery.</li>
<div class="wp-caption alignnone" style="width: 460px"><img class=" " title="Download Overlay Component" src="http://londatiga.net/images/flowplayer2/download_overlay.jpg" alt="Download Overlay Component" width="450" height="278" /><p class="wp-caption-text">Download Overlay Component</p></div>
<li>Include the<span style="color: #800000;"> jquery.tools.min.j</span><span style="color: #800000;">s</span> with in the HEAD section of your HTML</li>
<pre class="brush: xml; title: ;">
&lt;script src=&quot;scripts/jquery.tools.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;scripts/flowplayer-3.1.4.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
<p>or</p>
<pre class="brush: xml; title: ;">
&lt;script src=&quot;scripts/jquery-1.3.2.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;scripts/jquery.tools.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;scripts/flowplayer-3.1.4.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
</ul>
<p><strong><span style="text-decoration: underline;">How to Use</span></strong></p>
<p>To overlay a video,   use two div containers, one is for displaying video information (title and duration) and a splash image  as a video&#8217;s thumbnail and the second is for overlaying the video. To get thumbnail and duration of a video, you can use <span style="color: #800000;">mplayer</span> tool as <a title="Get video thumbnal and duration using mplayer" href="http://www.londatiga.net/it/programming/how-to-get-video-thumbnail-and-duration-using-mplayer-and-php/" target="_blank">explained here</a>.</p>
<p><span style="text-decoration: underline;">Overlay Single Video Player</span></p>
<p><span style="text-decoration: underline;"> </span></p>
<div class="wp-caption alignnone" style="width: 222px"><a title="View Demo Video Overlay" href="http://londatiga.net/tutorials/flowplayer2/single.html" target="_blank"><img class=" " title="View Demo" src="http://londatiga.net/images/flowplayer2/demo1.jpg" border="0" alt="View Demo" width="212" height="164" /></a><p class="wp-caption-text">View Demo</p></div>
<p><span style="text-decoration: underline;"><span style="text-decoration: underline;"> </span></span></p>
<p><span style="text-decoration: underline;">HTML</span></p>
<pre class="brush: xml; title: ;">
&lt;div class=&quot;video&quot; style=&quot;background-image:url(images/splash_01.jpg)&quot;&gt;
        &lt;a href=&quot;#&quot; rel=&quot;#orel&quot;&gt;
            &lt;img src=&quot;images/play.png&quot; alt=&quot;play&quot; title=&quot;play&quot; border=&quot;0&quot;&gt;
        &lt;/a&gt;
        &lt;div class=&quot;info&quot;&gt;
            PMDG Virtual Cockpit
            &lt;span&gt;00:27&lt;/span&gt;
        &lt;/div&gt;
&lt;/div&gt;

&lt;div id=&quot;orel&quot; class=&quot;overlay&quot;&gt;&lt;a href=&quot;video/video01.flv&quot; id=&quot;player&quot;&gt;&lt;/a&gt;&lt;/div&gt;
</pre>
<p><span style="color: #800000;">line 01:</span> container for video information, splash image, play button, and video title and duration.<br />
<span style="color: #800000;"> line 02:</span> trigger button (play button), the button image is inside the <span style="color: #800000;"><em>a</em></span> tag that has <span style="color: #800000;"><em>rel</em></span> tag (<span style="color: #800000;">orel</span>) that match with the video overlay container&#8217;s id (<span style="color: #800000;">line 11</span>)<br />
<span style="color: #800000;"> line 11:</span> container for video overlay</p>
<p><span style="text-decoration: underline;">CSS</span></p>
<pre class="brush: css; title: ;">
div.overlay {
	z-index:9999;
	padding:40px;
	width:476px;
	display:none;
	background-image:url(../images/gray.png);
}
div.overlay div.close {
	background:url(../images/close.png) no-repeat;
	position:absolute;
	top:2px;
	right:5px;
	width:35px;
	height:35px;
	cursor:pointer;
}
div.overlay a {
	height:370px;
	display:block;
}
div.video {
	height:150px;
	width:200px;
	border:2px solid #fff;
	outline:1px solid #ccc;
	-moz-outline-radius:4px;
	cursor:pointer;
	text-align:center;
	float:left;
	margin:5px;
}
div.video img {
	margin-top:50px;
}
div.video div.info {
	height:40px;
	background:#000 url(../images/h80.png) repeat-x;
	opacity:0.7;
	color:#fff;
	margin-top:2px;
	text-align:left;
	padding:5px 5px;
	font-family:&quot;bitstream vera sans&quot;,&quot;trebuchet ms&quot;;
	font-size:11px;
	border-top:1px solid #ccc;

}
div.video div.info span {
	color:#99FF99;
	display:block;
}
</pre>
<p>The CSS style definition for vide overlay</p>
<p><span style="text-decoration: underline;">JavaScript</span></p>
<pre class="brush: jscript; title: ;">
$(function() {
      var player = $f(&quot;player&quot;, &quot;swf/flowplayer-3.1.5.swf&quot;);

      $('a[rel]').overlay({
            expose: '#111',
            effect: 'apple',

            onLoad: function() {
                 player.load();
            },

            onClose: function() {
                player.unload();
            }
       });
});
</pre>
<p><span style="color: #800000;">line 02:</span> install flowplayer into it&#8217;s container<br />
<span style="color: #800000;"> line 04:</span> the overlay function, fired when user clicks on play button<br />
<span style="color: #800000;"> line 05: </span>expose color<br />
<span style="color: #800000;"> line 06</span>: overlay effect<br />
<span style="color: #800000;"> line 08:</span><span style="color: #000000;"> load the player<br />
<span style="color: #800000;"> line 12:</span> </span><span style="color: #000000;">u</span>nload the player when user clicks on close button</p>
<p><span style="text-decoration: underline;">Overlay Multiple Player</span></p>
<p><span style="text-decoration: underline;"> </span></p>
<div class="wp-caption alignnone" style="width: 440px"><a title="Demo Multiple Video Overlay" href="http://londatiga.net/tutorials/flowplayer2/multi.html" target="_blank"><img title="View Demo" src="http://londatiga.net/images/flowplayer2/demo2.jpg" alt="View Demo" width="430" height="163" /></a><p class="wp-caption-text">View Demo</p></div>
<pre class="brush: xml; title: ;">
&lt;div style=&quot;float:left&quot;&gt;
   &lt;div class=&quot;video&quot; style=&quot;background-image:url(images/splash_01.jpg)&quot;&gt;
      &lt;a href=&quot;#&quot; rel=&quot;#orel1&quot;&gt;
         &lt;img src=&quot;images/play.png&quot; alt=&quot;play&quot; title=&quot;play&quot; border=&quot;0&quot;&gt;
      &lt;/a&gt;
      &lt;div class=&quot;info&quot;&gt;
          PMDG Virtual Cockpit
          &lt;span&gt;00:27&lt;/span&gt;
       &lt;/div&gt;
   &lt;/div&gt;

   &lt;div id=&quot;orel1&quot; class=&quot;overlay&quot;&gt;&lt;a href=&quot;video/video01.flv&quot; class=&quot;player&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div style=&quot;float:left&quot;&gt;
   &lt;div class=&quot;video&quot; style=&quot;background-image:url(images/splash_02.jpg)&quot;&gt;
       &lt;a href=&quot;#&quot; rel=&quot;#orel2&quot;&gt;
          &lt;img src=&quot;images/play.png&quot; alt=&quot;play&quot; title=&quot;play&quot; border=&quot;0&quot;&gt;
       &lt;/a&gt;
       &lt;div class=&quot;info&quot;&gt;
            PMDG Virtual Cockpit - Dark
            &lt;span&gt;02:38&lt;/span&gt;
       &lt;/div&gt;
    &lt;/div&gt;

    &lt;div id=&quot;orel2&quot; class=&quot;overlay&quot;&gt;&lt;a href=&quot;video/video02.flv&quot; class=&quot;player&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p><span style="color: #800000;">line 01:</span> container for video 1<br />
<span style="color: #800000;"> line 03:</span> <span style="color: #800000;"><em>rel</em></span> tag must have a unique value for each video (orel1 &amp; orel2 for the two videos)<br />
<span style="color: #800000;"> line 12:</span> overlay container, it&#8217;s id must match the <em><span style="color: #800000;">rel</span></em> tag in<span style="color: #000000;"> </span><span style="color: #000000;">line 03</span><br />
<span style="color: #800000;"> line 15:</span> container for video 2</p>
<p><span style="text-decoration: underline;">CSS</span></p>
<p>Look at example 1</p>
<p><span style="text-decoration: underline;">JavaScript</span></p>
<pre class="brush: jscript; title: ;">
$(function() {
    $(&quot;a[rel]&quot;).overlay ({
         effect: 'apple',
	 expose: '#111',

         onLoad: function(content) {
             this.getOverlay().find(&quot;a.player&quot;).flowplayer(0).load();
         },

         onClose: function(content) {
              $f().unload();
         }
     });

     $(&quot;a.player&quot;).flowplayer(&quot;swf/flowplayer-3.1.5.swf&quot;);
});
</pre>
<p><span style="color: #800000;">line 07:</span> load video, overlay function looks for <em><span style="color: #800000;">a</span></em> element with <span style="color: #800000;"><em>player</em></span> class name within it&#8217;s container to load the video<br />
<span style="color: #800000;"> line 11:</span> unload video<br />
<span style="color: #800000;"> line 15: </span> install flowplayer</p>
<div style="padding:10px;background:#2dd354;"><a title="Download example source code" href="http://londatiga.net/downloads/tutorial/flowplayer2.zip" target="_self">Download Example Source Code</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.londatiga.net/featured-articles/how-to-overlay-video-using-jquery-tools-and-flowplayer/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to Use Flowplayer as Your Web Video Player (Beginner&#8217;s Guide)</title>
		<link>http://www.londatiga.net/it/how-to-use-flowplayer-as-your-web-video-player-beginners-guide/</link>
		<comments>http://www.londatiga.net/it/how-to-use-flowplayer-as-your-web-video-player-beginners-guide/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 18:47:02 +0000</pubDate>
		<dc:creator>lorenz</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[flash video player]]></category>
		<category><![CDATA[flowplayer]]></category>
		<category><![CDATA[flowplayer guides]]></category>
		<category><![CDATA[flowplayer howto]]></category>
		<category><![CDATA[flowplayer tutorial]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[swf]]></category>
		<category><![CDATA[web video player]]></category>

		<guid isPermaLink="false">http://www.londatiga.net/?p=346</guid>
		<description><![CDATA[Flowplayer is a free video player for the web that is used to embed video streamson a web page. Flowplayer is highly skinnable and extendable. You can customize it&#8217;s look and feel and also extend it&#8217;s functionality using available plugins. If you are an expert in JavaScript or ActionScript programming, you can even create your [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Flowplayer" href="http://flowplayer.org" target="_blank">Flowplayer</a> is a free video player for the web that is used to embed video streamson a web page. Flowplayer is highly skinnable and extendable. You can customize it&#8217;s look and feel and also extend it&#8217;s functionality using available plugins. If you are an expert in JavaScript or ActionScript programming, you can even create your own plugins according to your needs. There are two types of Flowplayer&#8217;s plugin, the <span style="color: #800000;">JavaScript</span> plugin that works outside the player and <span style="color: #800000;">Flash</span> plugin that works inside the player.</p>
<div class="wp-caption alignnone" style="width: 427px"><img title="Flowplayer" src="http://londatiga.net/images/flowplayer/flowplayer.jpg" alt="Flowplayer" width="417" height="315" /><p class="wp-caption-text">Flowplayer</p></div>
<p>Flowplayer is released in two versions:</p>
<ul>
<li>Open source (free) version (released under the GPL license).  In this version, the Flowplayer branding (logo) is always visible on the player, you can&#8217;t remove the logo.</li>
<li>Commercial version. In this version  you can remove the Flowplayer logo and place your own logo on the video.</li>
</ul>
<p>Current version of the time of this writting is version 3.1.5 which can be downloaded <a title="Download flowplayer" href="http://flowplayer.org/download/index.html" target="_blank">here</a>.</p>
<p><strong>Browser Compatibility</strong><br />
Flowplayer API and JavaScript plugins are dependent on JavaScript 1.5 which is supported by following browsers:</p>
<ul>
<li>Internet Explorer 6.0+</li>
<li>Firefox FF 2+</li>
<li>Safari 2.0+</li>
<li>Opera 2.0+</li>
</ul>
<p>Supported Flash Player: 9.0+</p>
<p><strong>Supported video formats</strong><br />
Currently Flowplayer support three video formats:</p>
<ul>
<li>Flv</li>
<li>H.264</li>
<li>Mp4</li>
</ul>
<p><strong>Using Flowplayer</strong></p>
<p><span style="text-decoration: underline;">Download and install Flowplayer</span></p>
<ul>
<li>Download the free version of Flowplayer (<a title="Download Flowplayer" href="http://releases.flowplayer.org/flowplayer/flowplayer-3.1.5.zip" target="_blank">flowplayer-3.5.1.zip</a> (161.2 kB))</li>
<li>Extract and copy <span style="color: #800000;">flowplayer-3.1.5.swf </span>and <span style="color: #800000;">f</span><span style="color: #800000;"><span style="color: #800000;">l</span>owplayer-3.1.4.min.js </span>into your web application directory</li>
<li>Include the <span style="color: #800000;">flowplayer-3.1.4.min.js</span> in the HEAD section of your HTML file</li>
<pre class="brush: xml; title: ;">
&lt;script src=&quot;scripts/flowplayer-3.1.4-min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
</ul>
<p><span style="text-decoration: underline;">Setup Video Container</span></p>
<p>To use Flowplayer, you have to setup a HTML element as a video container on your page. The element can be any HTML tag, but the most commonly used tags are anchor (<span style="color: #800000;">A</span>) and <span style="color: #800000;">DIV</span>.</p>
<pre class="brush: xml; title: ;">
&lt;a  href=&quot;videos/video01.flv&quot; style=&quot;display:block;width=&quot;400px&quot;; height=&quot;300px&quot; id=&quot;player&quot;&gt;
</pre>
<p><span style="text-decoration: underline;">Install Flowplayer</span></p>
<pre class="brush: jscript; title: ;">
&lt;script language=&quot;javascript&gt;
	flowplayer(&quot;player&quot;, &quot;swf/flowplayer-3.1.5.swf&quot;);
&lt;/script&gt;
</pre>
<p>To install Flowplayer, we call the JavaSript function &#8216;<span style="color: #800000;">flowplayer</span>&#8216; that has two arguments. The first argument &#8216;<span style="color: #800000;">player</span>&#8216; is the id of HTML element that used as video container and the second argument is the path to Flowplayer (swf file).</p>
<p><em>Syntax:</em></p>
<blockquote><p><em>flowplayer(&#8217;elemntId&#8217;, &#8216;pathtoswf&#8221;, config)</em></p></blockquote>
<p>where<em>:</em><br />
<em> elementId</em> is the id of video container<br />
<em> pathtoswf</em> is the path to Flowplayer<br />
<em> config</em> is player configuration</p>
<p>more information about &#8216;<span style="color: #800000;">flowplaye</span><span style="color: #800000;">r&#8217;</span> function can be read <a href="http://flowplayer.org/documentation/configuration/player.html" target="_blank">here</a></p>
<p><strong>Examples</strong></p>
<p>1. Single Player</p>
<pre class="brush: xml; title: ;">
&lt;a href=&quot;video/video01.flv&quot; style=&quot;display:block; width:400px; height:300px;&quot; id=&quot;player&quot;&gt;
&lt;script language='javascript'&gt;
        flowplayer(&quot;player&quot;, &quot;swf/flowplayer-3.1.5.swf&quot;);
&lt;/script&gt;
</pre>
<p><a title="Single player" href="http://londatiga.net/tutorials/flowplayer/single.html" target="_blank">View live demo</a></p>
<p>2. Multiple Player</p>
<pre class="brush: xml; title: ;">
&lt;a class=&quot;player&quot; href=&quot;video/video01.flv&quot; style=&quot;display:block; width:400px; height:300px&quot;&gt;
&lt;a class=&quot;player&quot; href=&quot;video/video02.flv&quot; style=&quot;display:block; width:400px; height:300px&quot;&gt;

&lt;script language=&quot;javascript&quot;&gt;
       flowplayer(&quot;a.player&quot;, &quot;swf/flowplayer-3.1.5.swf&quot;);
&lt;script&gt;
</pre>
<p>On the example above, we use two video player on the same  page, each <span style="color: #800000;">A</span> tag is assigned &#8216;<span style="color: #800000;">playe</span>r&#8217; CSS class name, which is defined in CSS section below.  The first argument of &#8216;<span style="color: #800000;">flowplayer&#8217;</span> function is <span style="color: #800000;">&#8216;a.playe</span><span style="color: #800000;">r&#8217;</span> that takes  format <span style="color: #800000;">tagName.className <span style="color: #000000;">which means that all <span style="color: #800000;">A</span> tagsthat have &#8216;<span style="color: #800000;">player</span>&#8216; class name will be used as video container.</span></span></p>
<pre class="brush: css; title: ;">
.player {
      display:block;
      width: 400px;
      height: 300px;
      float: left;
      margin-left: 10px;
}
</pre>
<p><a title="Multiple player" href="http://londatiga.net/tutorials/flowplayer/multi.html">View live demo</a></p>
<p>3. Using Splash Image</p>
<p>Splash image can be used as a preview of video content and also allow us to setup the Flowplayer instance so it is not activated until the user clicks on the image.</p>
<pre class="brush: xml; title: ;">
&lt;a href=&quot;video/video01.flv&quot;  style=&quot;display:block;width:400px;height:300px&quot; id=&quot;player&quot;&gt;
   &lt;img src=&quot;images/splash_01.jpg&quot; alt=&quot;PMDG MD11 Cockpit&quot;&gt;
&lt;/a&gt;

&lt;script language=&quot;javascript&quot;&gt;
      flowplayer(&quot;player&quot;, &quot;swf/flowplayer-3.1.5.swf&quot;);
&lt;/script&gt;
</pre>
<p><a title="Splash example" href="http://londatiga.net/tutorials/flowplayer/splash.html" target="_blank">View live demo</a></p>
<p>4. Using Clips</p>
<p>Clips represent movies to play in Flowplayer. Clips can also be provided as a Playlist with a series of clips that will be played in sequence. Clip and Playlist are objects of Player.</p>
<pre class="brush: xml; title: ;">
&lt;div style=&quot;display:block; width:400px; height:300px&quot; id=&quot;player&quot;&gt;&lt;/div&gt;

&lt;script language=&quot;javascript&quot;&gt;
        flowplayer(&quot;player&quot;, &quot;swf/flowplayer-3.1.5.swf&quot;, {
            clip: { url: 'video/video01.flv',
                    autoPlay: false
            }
        });
&lt;/script&gt;
</pre>
<p>On the example above, we use <span style="color: #800000;">DIV</span> tag as video container. By using <span style="color: #800000;">DIV</span>,  we can&#8217;t define the video url using <span style="color: #800000;">href</span> like in our previous examples that using <span style="color: #800000;">A</span> tag. The video url is defined within Clip object and we also set the <span style="color: #800000;">autoPlay</span> to<span style="color: #800000;"> false</span> that indicating the player should not start playback immediately upon loading.</p>
<p><a title="Using clips" href="http://londatiga.net/tutorials/flowplayer/clip.html" target="_blank">View live demo </a></p>
<div style="padding:10px;background:#2dd354;"><a title="Download scrollable demo source code" href="http://londatiga.net/downloads/tutorial/flowplayer.zip" target="_self">Download Example Source Code</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.londatiga.net/it/how-to-use-flowplayer-as-your-web-video-player-beginners-guide/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How to Create Scrollable Image Slider Using JavaScript</title>
		<link>http://www.londatiga.net/featured-articles/how-to-create-scrollable-image-slider-using-javascript/</link>
		<comments>http://www.londatiga.net/featured-articles/how-to-create-scrollable-image-slider-using-javascript/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 04:07:56 +0000</pubDate>
		<dc:creator>lorenz</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[image slider]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[scrollable]]></category>
		<category><![CDATA[scrollable image gallery]]></category>
		<category><![CDATA[scrollable images]]></category>
		<category><![CDATA[scrolling image]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://www.londatiga.net/?p=286</guid>
		<description><![CDATA[Scrollable image slider  is one of the interesting features in the image gallery application. This allows us to display thumbnails in the form of slides that can be scrolled automatically or manually using the control buttons.
Figure below shows a scrollable image slider featuring four thumbnails per slide. To display thumbnails from another slide, simply by [...]]]></description>
			<content:encoded><![CDATA[<p>Scrollable image slider  is one of the interesting features in the image gallery application. This allows us to display thumbnails in the form of slides that can be scrolled automatically or manually using the control buttons.</p>
<p><span title="Gambar di bawah ini menunjukkan sebuah Ren yang menampilkan empat gambar per slide, untuk menampilan gambar dari slide lain, hanya dengan mengklik tombol navigasi yang terdapat di kanan dan kiri slide.">Figure below shows a scrollable image slider featuring four thumbnails per slide. To display thumbnails from another slide, simply by clicking the navigation buttons located on the right and left slide. </span><span title="Slide juga dapat digerakkan secara otomatis menggunakan panah kiri dan kanan keybord atau menggunakan mouse wheel.">Slides can also be scrolled automatically by using the  left and right arrow keyboard or using  the mouse wheel.</span></p>
<div class="wp-caption aligncenter" style="width: 510px"><img title="Scrollable image gallery" src="http://londatiga.net/images/scrollable/scrollable.jpg" alt="Scrollable image gallery" width="500" height="111" /><p class="wp-caption-text">Scrollable image slider</p></div>
<p>In this tutorial, i&#8217;ll use <a title="Scrollable component" href="http://flowplayer.org/tools/scrollable.html" target="_blank">Scrollable</a> component from <a title="jQuery Tools" href="http://flowplayer.org/tools/index.html" target="_blank">jQuery Tools</a> user interface (UI) library which is based on popular <a title="jQuery Framework" href="http://jquery.com" target="_blank">jQuery</a> javascript framework. Current version of jQuery Tools at the time of this writing is version<a title="Version 1.1.2" href="http://flowplayer.org/tools/release-notes/index.html" target="_blank"> 1.1.2</a>, which can be downloaded <a title="Download jQuery Tools" href="http://flowplayer.org/tools/download.html" target="_blank">here</a>. The library itself consists of six user interface components that can be easily combined:  <a href="http://flowplayer.org/tools/tabs.html" target="_blank">Tabs</a>, <a href="http://flowplayer.org/tools/tooltip.html" target="_blank">Tooltip</a>, <a href="http://flowplayer.org/tools/overlay.html" target="_blank">Overlay</a>, <a href="http://flowplayer.org/tools/scrollable.html" target="_blank">Scrollable</a>, <a href="http://flowplayer.org/tools/expose.html" target="_blank">Expose</a>, and <a href="http://flowplayer.org/tools/flashembed.html" target="_blank">Flashembed</a>.</p>
<p><strong><span style="text-decoration: underline;">How to Setup</span></strong></p>
<ul>
<li>Download <span style="color: #800000;">S</span><span style="color: #800000;"><span style="color: #800000;">c</span>rollable <span style="color: #000000;">component</span></span> from <a href="http://flowplayer.org/tools/download.html" target="_blank">download page</a> and save it as <span style="color: #800000;">jquery.tools.min.js</span>. You can download it with<span style="color: #800000;"> </span><span style="color: #000000;">jQuery</span> (v1.3.2)  as a single file (21.75 kb) or as a separated file (3.37 kb) if you already have<span style="color: #000000;"> </span><span style="color: #000000;">jQuery</span>.</li>
<p><img class="alignnone" title="Download scrollable ui library" src="http://londatiga.net/images/scrollable/download.jpg" alt="" width="500" height="354" /></p>
<li>Include the <span style="color: #800000;">jquery.tools.min.js</span> in the HEAD section of your HTML file</li>
<pre class="brush: xml; title: ;">
&lt;script src=&quot;scripts/jquery.tools.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
<p>or</p>
<pre class="brush: xml; title: ;">
&lt;script src=&quot;scripts/jquery-1.3.2.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;scripts/jquery.tools.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
</ul>
<p><strong><span style="text-decoration: underline;">Using Scrollable UI library</span></strong></p>
<p><strong>HTML Code</strong></p>
<pre class="brush: xml; title: ;">
&lt;a class=&quot;prevPage left&quot;&gt;&lt;/a&gt;
&lt;div class=&quot;scrollable&quot;&gt;
    &lt;div class=&quot;items&quot;&gt;
        &lt;!-- 1-4 --&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img1.jpg&quot; /&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img2.jpg&quot; /&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img3.jpg&quot; /&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img4.jpg&quot; /&gt;

        &lt;!-- 5-8 --&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img5.jpg&quot; /&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img6.jpg&quot; /&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img7.jpg&quot; /&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img8.jpg&quot; /&gt;

        &lt;!-- 10-12 --&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img9.jpg&quot; /&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img10.jpg&quot; /&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img11.jpg&quot; /&gt;
        &lt;img src=&quot;http://londatiga.net/tutorials/scrollable/images/img12.jpg&quot; /&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;a class=&quot;nextPage right&quot;&gt;&lt;/a&gt;
</pre>
<p>line 01:  element for left/prev  button.</p>
<p>line 02: root element (div) for the scrollable.</p>
<p>line 03: wrapper element.</p>
<p>line 04-20: scrollable images (will be displayed  four images per slide).</p>
<p>line 24: element for right/next button.</p>
<p><strong>CSS Code</strong></p>
<p><em>Scrollable</em></p>
<pre class="brush: css; title: ;">
.scrollable {
	background: #ccc;
	position: relative;
	overflow: hidden;
	width: 690px;
	height:145px;
	border:1px solid #ccc;
	-moz-border-radius:4px;
	-webkit-border-radius:4px;
}

.scrollable .items {
	width: 20000em;
	position: absolute;
	clear: both;
}

.scrollable img {
    opacity: 0.6;
	float:left;
	margin:15px 5px 15px 15px;
	background-color:#fff;
	cursor:pointer;
	width:150px;
	height:113px;
	-moz-border-radius:4px;
	-webkit-border-radius:4px;
}

.scrollable .active {
    opacity:1;
	border:2px solid #000;
	z-index:9999;
	position:relative;
}
</pre>
<p>line 01, style for  container element, the length and width depends on image size and how many images you want displayed per slide.</p>
<p>line 12, style for wrapper element.</p>
<p>line 18,  style for images in a slide.</p>
<p>line 30, style for selected image.</p>
<p><em>Navigation button (prev &amp; next)</em></p>
<pre class="brush: css; title: ;">
.scrollable { float:left; }

a.left, a.right {
	display: block;
	width: 18px;
	height: 18px;
	float: left;
	margin: 60px 10px;
	cursor: pointer;
}

a.right { background: url(scrollable/arrow/right.png) no-repeat;  clear:right; margin-right: 0px;}
a.right:hover  { background-position:0px -18px; }
a.right:active 	{ background-position:0px 0px; }

a.left	{ background: url(scrollable/arrow/left.png) no-repeat;  margin-left: 0px; }
a.left:hover  { background-position:0px -18px; }
a.left:active  { background-position:-0px 0px; }

a.disabled { visibility:hidden !important; }
</pre>
<p>line 01, allow next and  prev buttons placed on each side of the slide.</p>
<p>line 12,  set size and position of prev and next buttons.</p>
<p>line 16,  set background image for prev and next buttons.</p>
<p><span style="text-decoration: underline;">Javascript Code</span></p>
<pre class="brush: jscript; title: ;">
&lt;script&gt;
	$(function()  { $(&quot;div.scrollable&quot;).scrollable({size: 4}); });
&lt;/script&gt;
</pre>
<p><span style="color: #800000;">$(&#8221;div.scrollable&#8221;) </span>is a jQuery selector for scrollabe container. On example above, we set four images for each slide using configuration parameter &#8216;<span style="color: #800000;">size</span>&#8216;. Default value of <span style="color: #800000;">&#8217;size</span>&#8216; parameter is 5. You can learn more about the API of the Scrollable component on <a title="Scrollable API" href="http://flowplayer.org/tools/scrollable.html" target="_blank">this page</a>.</p>
<div style="padding:10px;background:#2dd354;"><a title="Scrollable live demo" href="http://londatiga.net/tutorials/scrollable" target="_blank">View Live Demo</a> | <a title="Download scrollable demo source code" href="http://londatiga.net/downloads/tutorial/scrollable.zip" target="_self">Download Example Source Code</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.londatiga.net/featured-articles/how-to-create-scrollable-image-slider-using-javascript/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Free JavaScript Calendar Using Dynarch Calendar</title>
		<link>http://www.londatiga.net/it/programming/free-javascript-calendar-using-dynarch-calendar/</link>
		<comments>http://www.londatiga.net/it/programming/free-javascript-calendar-using-dynarch-calendar/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 09:10:14 +0000</pubDate>
		<dc:creator>lorenz</dc:creator>
				<category><![CDATA[Java Script]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[free javascript calendar]]></category>
		<category><![CDATA[inline calendar]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[popup calendar]]></category>

		<guid isPermaLink="false">http://www.londatiga.net/?p=263</guid>
		<description><![CDATA[Dynarch Calendar (JSCal2) is a free JavaScript calendar from Dynarch. It supports inline and popup view, disabling dates, selecting a range date, highliting special dates, date tooltips and themes. Current version at the time of this writting is 1.7 which can be downloaded here.
How to Setup

Download and extract the latest JSCal2 library (JSCal2-1.7.zip)
Copy css and [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Free JavaScrip Calendar" href="http://www.dynarch.com/projects/calendar/" target="_blank">Dynarch Calendar (JSCal2)</a> is a free JavaScript calendar from <a href="http://www.dynarch.com/" target="_blank">Dynarch</a>. It supports inline and popup view, disabling dates, selecting a range date, highliting special dates, date tooltips and themes. Current version at the time of this writting is 1.7 which can be downloaded <a href="http://www.dynarch.com/projects/calendar/download/" target="_blank">here</a>.</p>
<div class="wp-caption alignnone" style="width: 247px"><img class=" " title="Dynarch Calendar" src="http://londatiga.net/images/jscal2.jpg" alt="Dynarch Calendar" width="237" height="195" /><p class="wp-caption-text">Dynarch Calendar</p></div>
<p><strong>How to Setup</strong></p>
<ol>
<li>Download and extract the latest JSCal2 library (<a href="http://www.dynarch.com/projects/calendar/download/1.7/JSCal2-1.7.zip" target="_blank">JSCal2-1.7.zip</a>)</li>
<li>Copy <span style="color: #993300;">css</span> and<span style="color: #993300;"> js</span> directory from <span style="color: #993300;">src</span> directory into your web application directory.</li>
<li>Include<span style="color: #993300;"> jscal2.js</span>, <span style="color: #993300;">en.js</span> (your prefered language), <span style="color: #993300;">jscal2.css</span>, <span style="color: #993300;">border-radius.css</span> and your prefered theme css file (eg: <span style="color: #993300;">win2k.css</span>) in the HEAD section of your HTML file.</li>
<pre class="brush: xml; title: ;">
&lt;script src=&quot;js/jscal2.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;js/lang/en.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;link type=&quot;text/css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; href=&quot;css/jscal2.css&quot;/&gt;
&lt;link type=&quot;text/css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; href=&quot;css/border-radius.css&quot;/&gt;
&lt;link type=&quot;text/css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; href=&quot;css/win2k/win2k.css&quot;/&gt;
</pre>
</ol>
<p><strong>How to Use</strong></p>
<p><span style="text-decoration: underline;">Inline Calendar</span></p>
<pre class="brush: jscript; title: ;">
&lt;div id=&quot;calcontainer&quot;&gt;&lt;/div&gt;
&lt;input type=&quot;text&quot; name=&quot;calinfo&quot; id=&quot;calinfo&quot; size=&quot;25&quot;&gt;
&lt;Script Language=&quot;JavaScript&quot;&gt;
&lt;!--
Calendar.setup
( {
     cont: 'calcontainer',
     showTime: true,
     onSelect: function() {
           var date = this.selection.get();
           date      = Calendar.intToDate(date);
           date      = Calendar.printDate(date,&quot;%Y-%m-%d&quot;);

           document.getElementById('calinfo').value = date;
      }
})
//--&gt;
&lt;/Script&gt;
</pre>
<p><a title="Free JavaScript Calendar: Inline Calendar" href="http://londatiga.net/tutorials/jscal2/" target="_blank">Live demo</a></p>
<p>Line 01: Container to display calendar.</p>
<p>Line 02: Text field to display selection date.</p>
<p>Line 07: The container id.</p>
<p>Line 08:  Will display time selector if set to <span style="color: #993300;">true</span> and vice versa. Default value is <span style="color: #993300;">false</span>.</p>
<p>Line 09: Callback function that will be called when selection changes.</p>
<p><span style="text-decoration: underline;">Popup Calendar</span></p>
<pre class="brush: jscript; title: ;">
&lt;input type=&quot;text&quot; name=&quot;calinfo&quot; id=&quot;calinfo&quot; size=&quot;25&quot;&gt;
&lt;button id=&quot;caltrigger&quot;&gt;...&lt;/button&gt;
&lt;Script Language=&quot;JavaScript&quot;&gt;
&lt;!--
Calendar.setup({
     trigger    : &quot;caltrigger&quot;,
     inputField : &quot;calinfo&quot;,
     dateFormat: &quot;%Y/%m/%d&quot;
});
//--&gt;
&lt;/Script&gt;
</pre>
<p><a title="Free JavaScript Calendar: Popup Calendar" href="http://londatiga.net/tutorials/jscal2/index2.html" target="_blank">Live demo</a></p>
<p>Line 01: Text field to display selection date.</p>
<p>Line 02: Trigger button to display popup calendar.</p>
<p>Line 06: Trigger button id.</p>
<p>Line 07: Text field id.</p>
<p>Line 08: Date format (<a href="http://www.dynarch.com/projects/calendar/doc/#printDate" target="_blank">view api documentation</a>)</p>
<p><span style="text-decoration: underline;">Disabling Dates</span></p>
<p>There are two simple ways to disable dates, by using <span style="color: #993300;">min</span> and <span style="color: #993300;">max</span> arguments in the constructor or by using <span style="color: #993300;">disabled()</span> callback function.</p>
<pre class="brush: jscript; title: ;">
Calendar.setup ({
    cont: 'calinfo',
    min: 20100110,
    max: 20100125
});
</pre>
<p><a title="Free JavaScript Calendar: Disabling dates" href="http://londatiga.net/tutorials/jscal2/index3.html" target="_blank">Live demo</a></p>
<p>Line 3: The minimum (oldest) date that the calendar allows for selection.</p>
<p>Line 4: The maximum date</p>
<pre class="brush: jscript; title: ;">
var disabledDates = { 20100111: true, 20100112: true };
Calendar.setup({
    cont     : 'calinfo',
    disabled : function(date) {
        date = Calendar.dateToInt(date);
        return date in disabledDates;
    }
});
</pre>
<p>Line 1:  Disabled dates definition.</p>
<p>Line 4: Callback function to disable dates.</p>
<p><span style="text-decoration: underline;">Highliting Dates &amp; Tooltip</span></p>
<pre class="brush: jscript; title: ;">
var dateInfo = {
     20100114: { klass: &quot;highlight&quot;, tooltip: &quot;Hellow World!&quot; },
     20100115: { klass: &quot;highlight&quot;, tooltip: &quot;Hola Mundo!&quot; }
};

var cal = Calendar.setup ({
     cont     : 'calcontainer',
     dateInfo : function (date, wantsClassName) {
         var as_number = Calendar.dateToInt(date);

         return DATE_INFO[as_number];
     }
});
</pre>
<p><a title="Free JavaScript Calendar: Hightliting &amp; Tooltips" href="http://londatiga.net/tutorials/jscal2/index5.html" target="_blank">Live demo</a></p>
<p>Line 01-04: Highlighted date and tooltip definitions. set highlight CSS class in<span style="color: #993300;"> klass</span> parameter and tooltip message in <span style="color: #993300;">tooltip</span> parameter.</p>
<p>Line 08: Callback function to display highlighted dates and tooltip.</p>
<p>CSS definition</p>
<pre class="brush: css; title: ;">
.highlight { font-weight:bold; color:#ff0000; }
</pre>
<p>You can read the complete api documentation <a href="http://www.dynarch.com/projects/calendar/doc/">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.londatiga.net/it/programming/free-javascript-calendar-using-dynarch-calendar/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Crop Image Using JavaScript and PHP</title>
		<link>http://www.londatiga.net/it/how-to-crop-image-using-javascript-and-php/</link>
		<comments>http://www.londatiga.net/it/how-to-crop-image-using-javascript-and-php/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 00:46:01 +0000</pubDate>
		<dc:creator>lorenz</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[image crop]]></category>
		<category><![CDATA[image crop guide]]></category>
		<category><![CDATA[image crop howto]]></category>
		<category><![CDATA[image crop javascript]]></category>
		<category><![CDATA[image crop php]]></category>
		<category><![CDATA[image crop tutorial]]></category>
		<category><![CDATA[image cropping]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php GD]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://www.londatiga.net/?p=250</guid>
		<description><![CDATA[Image cropping is a usefull feature in web application that allows user to crop an image on a web page and save it for later use. This feature is commonly used in user&#8217;s preferences tool for creating a profile image. User uploads an image from his local hardrive and then directly crop his desired part [...]]]></description>
			<content:encoded><![CDATA[<p>Image cropping is a usefull feature in web application that allows user to crop an image on a web page and save it for later use. This feature is commonly used in user&#8217;s preferences tool for creating a profile image. User uploads an image from his local hardrive and then directly crop his desired part  for used as his profile image without using an image editing software.</p>
<div class="wp-caption alignnone" style="width: 510px"><img title="Image Cropping" src="http://londatiga.net/images/imagecropping/imagecropping.jpg" alt="Image Cropping" width="500" height="375" /><p class="wp-caption-text">Image Cropping</p></div>
<p>Image cropping process can be separated into two separated process. The first process is  for acquaring  coordinates and dimensions of selected area of an image, which will be done in client side using JavaScript. The next is  process for creating a new image based on coordinates and dimensions from previously cropping process using PHP on server side. In this tutorial, i&#8217;ll use JavaScript <a href="http://www.defusion.org.uk/code/javascript-image-cropper-ui-using-prototype-scriptaculous/comment-page-27/" target="_blank">Image Cropper</a> library by David Spurr and PHP GD image processing functions.</p>
<p><strong>Client Side</strong></p>
<p>Image Cropper is an excellent JavaScript library written by David Spurr that makes image cropping easier. It allows us to crop an image using an interface with the same features and styling as found in commercial image editing software. It is based on <a href="http://www.prototypejs.org/" target="_blank">Prototype</a> JavaScript Framework and <a href="http://script.aculo.us/" target="_blank">Scriptaculous</a>.</p>
<p><span style="text-decoration: underline;">How to Setup</span></p>
<ol>
<li>Download the required library files</li>
<p>- <a href="http://www.prototypejs.org/download">Prototype Javascript Framework</a></p>
<p>- <a href="http://script.aculo.us/downloads">Scriptaculous (scriptaculous-js-1.8.3.zip)</a></p>
<p>- <a href="http://www.defusion.org.uk/code/javascript-image-cropper-ui-using-prototype-scriptaculous/download-zip/" target="_blank">Image Cropper (jsCropperUI-1.2.1.zip)</a></p>
<li>Extract <span style="color: #800000;">scriptaculous-js-1.8.3.zip <span style="color: #000000;"> </span></span> and copy <span style="color: #800000;">scriptaculous.js</span>, <span style="color: #800000;">builder.js</span>, <span style="color: #800000;">effect.js</span> and <span style="color: #800000;">dragdrop.js</span> from the extracted files into your web application directory.</li>
<li>Extract <span style="color: #800000;">jsCropperUI-1.2.1.zip</span> and copy <span style="color: #800000;">cropper.js, marqueeHoriz.gif, marqueeVert.gif, cropper.css</span> from the extracted files into your web application directory (  must reside in the same directory).</li>
<li>Include <span style="color: #800000;">Prototype.js</span>, <span style="color: #800000;">scriptaculous.js <span style="color: #000000;">and</span> </span><span style="color: #800000;">cropper.j</span><span style="color: #800000;">s</span> in the HEAD section of your HTML file.
<pre class="brush: xml; title: ;">
&lt;script src=&quot;scripts/prototype.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;scripts/scriptaculous.js?load=effects,builder,dragdrop&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;scripts/cropper.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
</li>
</ol>
<p><span style="text-decoration: underline;">Using Image Cropper Library</span></p>
<p><span style="text-decoration: underline;">With  Dynamic Crop Preview</span></p>
<pre class="brush: jscript; title: ;">
&lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
Event.observe (
	window,
	'load',
	function() {
		new Cropper.ImgWithPreview(
			't3soeta',
			{
				minWidth: 200,
				minHeight: 100,
                ratioDim: { x: 200, y: 100 },
				displayOnInit: true,
				onEndCrop: saveCoords,
                onloadCoords: { x1: 0, y1: 0, x2: 200, y2: 100 },
                previewWrap: 'preview'
			}
		)
	}
);

function saveCoords (coords, dimensions)
{
	$( 'x1' ).value = coords.x1;
	$( 'y1' ).value = coords.y1;
	$( 'width' ).value = dimensions.width;
	$( 'height' ).value = dimensions.height;
}
&lt;/script&gt;

&lt;form action=&quot;saveCrop.php&quot; method=&quot;post&quot;&gt;
&lt;div style=&quot;width:750px&quot;&gt;
    &lt;div style=&quot;float:left&quot;&gt;
        &lt;img src=&quot;images/t3soeta.jpg&quot; id=&quot;t3soeta&quot; width=&quot;500&quot; height=&quot;375&quot; /&gt;
    &lt;/div&gt;
    &lt;div id=&quot;preview&quot; style=&quot;float:right;&quot;&gt;&lt;/div&gt;
    &lt;div style=&quot;clear:both&quot;&gt;&lt;/div&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;x1&quot; id=&quot;x1&quot; value=&quot;&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;y1&quot; id=&quot;y1&quot; value=&quot;&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;width&quot; id=&quot;width&quot; value=&quot;&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;height&quot; id=&quot;height&quot; value=&quot;&quot;&gt;
&lt;/div&gt;
&lt;input type=&quot;submit&quot; name=&quot;Done&quot; value=&quot; Done &quot;&gt;
&lt;/form&gt;
</pre>
<p><strong>Line 06:</strong> Instantiate Image Cropper class.</p>
<p><strong>Line 07:</strong> Image Id.</p>
<p><strong>Line 09:</strong> <span style="color: #800000;">minWidth</span>, is the minimum width for  selected area in pixels.</p>
<p><strong>Line 10</strong>: <span style="color: #800000;">minHeight</span>, is the minimum height for selected area in pixels.</p>
<p><strong>Line 11:</strong> <span style="color: #800000;">ratioDim</span>, is the pixel dimensions to apply as a restrictive ratio, with properties x &amp; y.</p>
<p><strong>Line 12: </strong><span style="color: #800000;">displayOnInit</span>, whether display the selected area on initialisation. If set to <span style="color: #800000;">true</span>, <span style="color: #800000;">minWidth</span> and <span style="color: #800000;">minHeight</span> or <span style="color: #800000;">ratioDim</span> must be provided.</p>
<p><strong>Line 13:</strong> o<span style="color: #800000;">nEndCrop</span>, a callback function which will be called when user finished a crop movement. The function takes two arguments:</p>
<ul>
<li>coords, is the coordinates of selected area with properties <span style="color: #800000;">x1</span>, <span style="color: #800000;">y1</span>, <span style="color: #800000;">x2</span>,  <span style="color: #800000;">y2</span>.</li>
<li>dimensions , is the dimensions of selected area with properties <span style="color: #800000;">w</span><span style="color: #800000;">idth</span> and<span style="color: #800000;"> height</span>.</li>
</ul>
<p>On example above (Line 21), coordinates and dimensions are stored in hidden elements and will be sent to server side script (<span style="color: #800000;">s</span><span style="color: #800000;">aveCrop.php</span>) using HTTP POST method for later processing .</p>
<p><strong>Line 14: </strong><span style="color: #800000;">onloadCoords<span style="color: #000000;">, is the coordinates of the selected area to display onload</span></span></p>
<p><strong>Line 15: </strong><span style="color: #800000;">previewWra</span><span style="color: #800000;">p</span>, is the id of container for image crop preview.</p>
<p><strong>Line 21: </strong>callback function, as set on <span style="color: #800000;">onEndCrop</span> option (Line 13).</p>
<p><strong>Line 33:</strong> image to be cropped, it&#8217;s id must match the id set on Line 07.</p>
<p><strong>Line 35: </strong>div container for image crop preview.</p>
<p><strong>Line 37-40</strong>: Hidden elements to store coordinates and dimensions of selected area.</p>
<p>View live demo <a title="Image Cropping" href="http://londatiga.net/tutorials/imagecrop/example.html" target="_blank">here</a></p>
<p><span style="text-decoration: underline;">Without Dynamic Crop Preview</span></p>
<p>For using Image Cropper without dynamic preview, change the class from <span style="color: #800000;">Cropper.ImgWithPrevie</span><span style="color: #800000;">w</span> to <span style="color: #800000;">Cropper.Img<span style="color: #000000;"> and remove the <span style="color: #800000;">previewWrap</span> option.</span></span></p>
<pre class="brush: jscript; title: ;">
Event.observe (
	window,
	'load',
	function() {
		new Cropper.Img (
			't3soeta',
			{
				minWidth: 200,
				minHeight: 100,
                ratioDim: { x: 200, y: 100 },
				displayOnInit: true,
				onEndCrop: saveCoords,
                onloadCoords: { x1: 0, y1: 0, x2: 200, y2: 100 },
			}
		)
	}
);
</pre>
<p><span style="color: #800000;"><span style="color: #000000;">View live demo <a title="Image Cropping" href="http://londatiga.net/tutorials/imagecrop/example2.html" target="_blank">here</a></span></span></p>
<p><span style="color: #800000;"><span style="color: #000000;"><strong>Server Side</strong></span></span></p>
<p>On server side, image is processed using PHP GD image functions, which required GD library installed.</p>
<pre class="brush: php; title: ;">
&lt;?php
$x1      = $_POST['x1'];
$y1      = $_POST['y1'];
$width   = $_POST['width'];
$height  = $_POST['height'];

$srcImg  = imagecreatefromjpeg('images/t3soeta.jpg');
$newImg  = imagecreatetruecolor($width, $height);

imagecopyresampled($newImg, $srcImg, 0, 0, $x1, $y1, $width, $height, $width, $height);

imagejpeg($newImg, 'images/cropped_t3soeta.jpg');
?&gt;
</pre>
<p><strong>Line 02-05: </strong>get coordinates and dimensions sent from client.</p>
<p><strong>Line 07:</strong> create source image</p>
<p><strong>Line 08:</strong> create a new true color image for cropped image</p>
<p><strong>Line 10:</strong> copy selected area from source image into new image using coordinates and dimensions sent from client.</p>
<p><strong>Line 12</strong>: Output the new cropped image into a file.</p>
<div style="padding:10px;background:#2dd354;"><a title="Download image crop demo source code" href="http://londatiga.net/downloads/tutorial/imagecrop.zip" target="_self">Download Example Source Code</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.londatiga.net/it/how-to-crop-image-using-javascript-and-php/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>How to Create Image Overlay Using Javascript</title>
		<link>http://www.londatiga.net/it/how-to-create-image-overlay-using-javascript/</link>
		<comments>http://www.londatiga.net/it/how-to-create-image-overlay-using-javascript/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 09:06:50 +0000</pubDate>
		<dc:creator>lorenz</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[imaga overlay javascript]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[image overlay]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[light view]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[overlay image javascript]]></category>

		<guid isPermaLink="false">http://www.londatiga.net/?p=235</guid>
		<description><![CDATA[Image overlay on a web page could be done easily using Lightbox javascript library that could be downloaded here. The library uses Prototype Framework and Scriptaculous effects library. In this tutorial, i&#8217;ll use Lightbox library version 2.0, the latest version at the time on this writing.
A.  How to Setup

Include the three javascript libraries (prototype.js, scriptaculous.js and [...]]]></description>
			<content:encoded><![CDATA[<p>Image overlay on a web page could be done easily using <a href="http://www.lokeshdhakar.com/projects/lightbox2/" target="_blank">Lightbox</a> javascript library that could be downloaded<a href="http://www.lokeshdhakar.com/projects/lightbox2/#download"> here</a>. The library uses <a href="http://www.prototypejs.org/" target="_blank">Prototype Framework</a> and <a href="http://script.aculo.us/" target="_blank">Scriptaculou</a>s effects library. In this tutorial, i&#8217;ll use Lightbox library version 2.0, the latest version at the time on this writing.</p>
<div class="wp-caption alignnone" style="width: 460px"><img title="Image Overlay Using Lightbox" src="http://londatiga.net/images/imageoverlay/imageoverlay.jpg" alt="Image Overlay Using Lightbox" width="450" height="355" /><p class="wp-caption-text">Image Overlay Using Javascript Lightbox</p></div>
<p><span style="color: #000000;"><strong>A.  How to Setup</strong></span></p>
<ul>
<li>Include the three javascript libraries (<span style="color: #993300;">prototype.j</span><span style="color: #993300;">s</span>, <span style="color: #993300;">scriptaculous.js</span> and<span style="color: #993300;"> lightbox.js</span>) inside the HEAD section on your html page.</li>
</ul>
<pre class="brush: xml; title: ;">
&lt;script type=&quot;text/javascript&quot; src=&quot;script/prototype.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;script/scriptaculous.js?load=effects,builder&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;script/lightbox.js&quot;&gt;&lt;/script&gt;
</pre>
<ul>
<li>Include the Lightbox CSS file</li>
</ul>
<pre class="brush: xml; title: ;">
&lt;link rel=&quot;stylesheet&quot; href=&quot;css/lightbox.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
</pre>
<ul>
<li>Make sure you have set the correct path to the following image files: <span style="color: #993300;">prevlabel.gif</span>, <span style="color: #993300;">nextlabel.gif</span>, <span style="color: #993300;">loading.gif</span>, and <span style="color: #993300;">closelabel.gif <span style="color: #000000;">on the CSS file</span></span>.</li>
</ul>
<p><strong>B. How to Apply</strong></p>
<p><span style="color: #000000;"><span style="text-decoration: underline;">On Single Image</span></span></p>
<p>If you want to make overlay image on a single image, add <code><span style="color: #993300;">rel="lightbox"</span></code> attribute to the link tag to activate the lightbox</p>
<pre class="brush: xml; title: ;">
&lt;a href=&quot;images/mandala1.jpg&quot; rel=&quot;lightbox&quot; title=&quot;Approaching Juanda&quot;&gt;
&lt;img src=&quot;images/mandala-small1.jpg&quot; border=&quot;0&quot; class=&quot;image&quot;&gt;
&lt;/a&gt;
</pre>
<p>To show image description on the overlay image, add <span style="color: #993300;">title</span> tag to the link tag.</p>
<p><span style="text-decoration: underline;"> On Group of Images</span></p>
<p>To make overlay on a set of related images in a group,  append the group name in a square bracket after the rel attribute , <span style="color: #993300;">rel=&#8221;lightbox[groupname]&#8220;<span style="color: #000000;">.</span></span></p>
<pre class="brush: xml; title: ;">
&lt;a href=&quot;images/mandala1.jpg&quot; rel=&quot;lightbox[mandala]&quot; title=&quot;Approaching Juanda&quot;&gt;
&lt;img src=&quot;images/mandala-small1.jpg&quot; border=&quot;0&quot; class=&quot;image&quot;&gt;
&lt;/a&gt;

&lt;a href=&quot;images/mandala2.jpg&quot; rel=&quot;lightbox[mandala]&quot; title=&quot;Banking Right, intercept ILS RWY10&quot;&gt;
&lt;img src=&quot;images/mandala-small2.jpg&quot; border=&quot;0&quot; class=&quot;image&quot;&gt;
&lt;/a&gt;

&lt;a href=&quot;images/mandala3.jpg&quot; rel=&quot;lightbox[mandala]&quot; title=&quot;Ready to Land&quot;&gt;
&lt;img src=&quot;images/mandala-small3.jpg&quot; border=&quot;0&quot; class=&quot;image&quot;&gt;
&lt;/a&gt;

&lt;a href=&quot;images/mandala4.jpg&quot; rel=&quot;lightbox[mandala]&quot; title=&quot;Touchdown, spoilers deployed&quot;&gt;
&lt;img src=&quot;images/mandala-small4.jpg&quot; border=&quot;0&quot; class=&quot;image&quot;&gt;
&lt;/a&gt;
</pre>
<p>View live demo <a title="Image Overlay Using Javascript (Lightbox)" href="http://londatiga.net/tutorials/imageoverlay/index.html" target="_blank">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.londatiga.net/it/how-to-create-image-overlay-using-javascript/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to Create Flash Like Image Slideshow with JavaScript</title>
		<link>http://www.londatiga.net/it/how-to-create-flash-like-image-slideshow-with-javascript/</link>
		<comments>http://www.londatiga.net/it/how-to-create-flash-like-image-slideshow-with-javascript/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 10:40:32 +0000</pubDate>
		<dc:creator>lorenz</dc:creator>
				<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[flash like slideshow]]></category>
		<category><![CDATA[flash slideshow]]></category>
		<category><![CDATA[image fadein]]></category>
		<category><![CDATA[image slideshow]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript fadein]]></category>
		<category><![CDATA[javascript slideshow]]></category>

		<guid isPermaLink="false">http://www.londatiga.net/?p=194</guid>
		<description><![CDATA[In some cases on web application development, image slideshow is a nice option to display images in an interactive mode, which nowdays,  could be done well using Adobe Flash. However, Flash has it&#8217;s own drawbacks such as it needs additional player plugin installed on the client browser  and another extra size of swf file to [...]]]></description>
			<content:encoded><![CDATA[<p>In some cases on web application development, image slideshow is a nice option to display images in an interactive mode, which nowdays,  could be done well using <a href="www.adobe.com/products/flash/" target="_blank">Adobe Flash</a>. However, Flash has it&#8217;s own drawbacks such as it needs additional <a href="http://www.adobe.com/products/flashplayer/" target="_blank">player</a> plugin installed on the client browser  and another extra size of <a href="http://en.wikipedia.org/wiki/SWF" target="_blank">swf</a> file to be downloaded.</p>
<p>Another way for displaying image slideshow  is by using Javascript which is more simple and easier to apply.  In this tutorial, i will use <em>Ultimate Fade-In Slideshow</em> Javascript library from  <a href="http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm" target="_blank">Dynamic Drive</a> which can be downloaded <a href="http://www.dynamicdrive.com/dynamicindex14/fadeslideshow.js" target="_self">here</a>. It needs JQuery library that can be downloaded <a href="http://jquery.com/" target="_blank">here</a>.</p>
<p>To use <em>Ultimate Fade-In Slideshow</em>, simply include the two library files (<span style="color: #000000;">jquery-1.3.2.min.j</span><span style="color: #000000;">s</span> and fadeinslideshow.js) inside the HEAD section of the page and the code for displaying image slideshow itself.   Below is the html template that used for entire examples in this tutorial. Replace the <em>&lt;!&#8211; insert example script below here //&#8211;&gt;</em> section with the code on each example.</p>
<p><span style="color: #993300;">Example HTML Template</span></p>
<pre class="brush: xml; title: ;">
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Image Slideshow With JavaScript&lt;/title&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;scripts/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;scripts/fadeinslideshow.js&quot;&gt;&lt;/script&gt;

    &lt;!-- insert example script below here //--&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h2&gt;Image Slideshow Without Description and Hyperlinking&lt;/h2&gt;
    &lt;div id=&quot;slideshow&quot;&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><span style="color: #800000;">Example 1. Auto playing slideshow without description and hyperlinking.</span></p>
<pre class="brush: jscript; title: ;">
&lt;script type=&quot;text/javascript&quot;&gt;
    var gallery1 = new fadeSlideShow ({
        wrapperid: 'slideshow',
        dimensions: [300, 225],
        imagearray: [
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img01.png&quot;],
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img02.png&quot;],
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img03.png&quot;]
        ],
        displaymode: {type: 'auto', pause: 2500, cycles:0, wraparound: true},
        persist: false,
        fadeduration: 2500,
        descreveal: 'ondemand',
        togglerid: ''
    })
    &lt;/script&gt;
</pre>
<p><a title="Slideshow without description and hyperlinking" href="http://londatiga.net/tutorials/fadeinslideshow/example1.html" target="_blank">View live demo</a></p>
<p><strong>line 2</strong>:  create an instance of <em>fadeSlideShow</em> class with the following options:</p>
<p><strong>line 3:</strong> <em><span style="color: #000000;">wrapperid</span></em>, the id of an empty div container on your page that will show the fade in slideshow images.</p>
<p><strong>line 4</strong>:  <em>dimensions</em>, dimension of the slideshow in the format [width, height] with pixels unit.</p>
<p><strong>line 5</strong>: <em>imagearray</em>, an array containing the images you wish to show. The syntax is:</p>
<p><span style="color: #000000;"><em>["path_to_image", "optional_url", "optional_linktarget", "optional_description"]</em></span></p>
<p><span style="color: #993300;"><span style="color: #000000;">The<em> path_to_image </em>option<em> </em>is the path or url to your  image,</span></span></p>
<p><span style="color: #993300;"><span style="color: #000000;">The<em> optional_url </em>option is the url for hyperlinking,</span></span></p>
<p><span style="color: #993300;"><span style="color: #000000;">The <em>optional_linktarget </em>option is the link target (open in the same window or new window),</span></span></p>
<p>The <em>optional_description </em>option is the  description of your image</p>
<p>For image without hyperlinking and description, just define the <em>path_to_image </em>option and eliminate the other options</p>
<p><strong>line 10</strong>: <em>displaymode</em>, the primary attributes of your slideshow. The syntax is:</p>
<p><em>{type:&#8217;auto|manual&#8217;, pause:milliseconds, cycles:0|integer, wraparound:true|false, randomize:true|false}</em></p>
<p>The <em>type</em> option is for auto slideshow or manual slideshow. If manual, you must define your own <em>prev</em> and <em>next</em> controls to let the user control the slideshow. See <em>togglerid</em> option below for more info.</p>
<p>The <em>pause</em> option when set to 0 will cause the slideshow to rotate perpetually in automatic mode, while any number larger than 0 means it will stop after x cycles.</p>
<p>The <em>warparound</em> option when set to<span style="color: #800000;"> <span style="color: #000000;">false</span></span> will disable the user&#8217;s ability in manual mode to go past the very first and last slide when clicking on the navigation links to manually view the slides.</p>
<p>The  <em>randomize</em> option when set to true will shuffle the display order of the images, so they appear in a different order each time the page is loaded.</p>
<p>In the example above, the slideshow will auto run and pause 2500 miliseconds between slides. The images will appear in a different order every time the page is loaded.</p>
<p><strong>line 11</strong>: <em>persists, </em>is a boolean variable that decides whether the slideshow should remember and recall the last viewed slide within a browser session when the page is reloaded<em>.</em></p>
<p><strong>line 12</strong>: <em>fadeduration, </em> the duration in miliseconds of the fade effect when transitioning from one image to the next.</p>
<p><strong>line 13</strong>: <em>descreveal</em>, is the option for displaying image description if you define it. If  set <em>always, </em>the description will be displayed persistently at the bottom of the image, and <em>ondemand </em>will display the description when user mouses over the image.</p>
<p><strong>line 14</strong>: <em>togglerid</em>,  is the option you used if you wish to create navigational controls that allow the user to explicitly move back and forth between slides.</p>
<p><span style="color: #993300;">Example2. Auto playing slideshow with all slides hyperlinked.</span></p>
<pre class="brush: jscript; title: ;">
&lt;script type=&quot;text/javascript&quot;&gt;
    var gallery1 = new fadeSlideShow ({
        wrapperid: 'slideshow',
        dimensions: [300, 225],
        imagearray: [
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img01.png&quot;, &quot;http://www.panoramio.com/photo/25232721&quot;, &quot;_new&quot;],
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img02.png&quot;, &quot;http://www.panoramio.com/photo/25232985&quot;, &quot;_new&quot;],
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img03.png&quot;, &quot;http://www.panoramio.com/photo/25232048&quot;, &quot;_new&quot;]
        ],
        displaymode: {type: 'auto', pause: 2500, cycles:0, wraparound: true },
        persist: false,
        fadeduration: 2500,
        descreveal: 'ondemand',
        togglerid: ''
    })
    &lt;/script&gt;
</pre>
<p>On <em>imagearray </em>option, we define the the url for each image on the second option, and set <em>_new </em>value on the third option to open the url in new window.</p>
<p><a title="Auto playing slideshow with all slides showing a persistence description" href="http://londatiga.net/tutorials/fadeinslideshow/example2.html" target="_blank">View live demo</a></p>
<p><span style="color: #993300;">Example 3. Auto playing slideshow with all slides showing a persistence description.</span></p>
<pre class="brush: jscript; title: ;">
&lt;script type=&quot;text/javascript&quot;&gt;
    var gallery1 = new fadeSlideShow ({
        wrapperid: 'slideshow',
        dimensions: [300, 225],
        imagearray: [
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img01.png&quot;, &quot;&quot;, &quot;&quot;, &quot;Gas Station, Ende Flores&quot;],
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img02.png&quot;, &quot;&quot;, &quot;&quot;, &quot;St. Michael Church&quot;],
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img03.png&quot;, &quot;&quot;, &quot;&quot;, &quot;IPI Beach&quot;]
        ],
        displaymode: {type: 'auto', pause: 2500, cycles:0, wraparound: true },
        persist: false,
        fadeduration: 2500,
        descreveal: 'always',
        togglerid: ''
    })
    &lt;/script&gt;
</pre>
<p><a title="Auto playing slideshow with all slides showing a persistence description" href="http://londatiga.net/tutorials/fadeinslideshow/example3.html" target="_blank">View live demo</a></p>
<p>On <em>imagearray </em>option, we define the description for each image on the fourth option, left the second and third option empty.</p>
<p><span style="color: #993300;">Example 4. Auto playing slideshow with all slides showing description when user mouses over it.</span></p>
<pre class="brush: jscript; title: ;">
&lt;script type=&quot;text/javascript&quot;&gt;
    var gallery1 = new fadeSlideShow ({
        wrapperid: 'slideshow',
        dimensions: [300, 225],
        imagearray: [
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img01.png&quot;, &quot;&quot;, &quot;&quot;, &quot;Gas Station, Ende Flores&quot;],
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img02.png&quot;, &quot;&quot;, &quot;&quot;, &quot;St. Michael Church&quot;],
            [&quot;http://londatiga.net/tutorials/fadeinslideshow/images/img03.png&quot;, &quot;&quot;, &quot;&quot;, &quot;IPI Beach&quot;]
        ],
        displaymode: {type: 'auto', pause: 2500, cycles:0, wraparound: true },
        persist: false,
        fadeduration: 2500,
        descreveal: 'ondemand',
        togglerid: ''
    })
    &lt;/script&gt;
</pre>
<p><a title="Auto playing slideshow with all slides showing description when user mouses over it" href="http://londatiga.net/tutorials/fadeinslideshow/example4.html" target="_blank">View live demo</a></p>
<p>Option <em>descreveal </em>is set to <em>&#8216;ondemand</em><em>&#8216; </em>to display image description when the user mouse over it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.londatiga.net/it/how-to-create-flash-like-image-slideshow-with-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Prototype: Using Ajax.Updater to Update Browser&#8217;s DOM Element</title>
		<link>http://www.londatiga.net/it/prototype-using-ajax-updater-to-update-browsers-dom-element/</link>
		<comments>http://www.londatiga.net/it/prototype-using-ajax-updater-to-update-browsers-dom-element/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 18:12:59 +0000</pubDate>
		<dc:creator>lorenz</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[Information Technology]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[ajax.updater]]></category>
		<category><![CDATA[browser dom update]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[dom update after ajax request]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[update dom]]></category>

		<guid isPermaLink="false">http://www.londatiga.net/?p=139</guid>
		<description><![CDATA[Ajax has become popular since it allows web application to behave interactively like a desktop application. It allows asynchronous communication between client (browser) and server so web applications can retrieve data from server  in the background without interfering with the display and behavior of the existing page.
There are some javascript frameworks available over internet that help [...]]]></description>
			<content:encoded><![CDATA[<p>Ajax has become popular since it allows web application to behave interactively like a desktop application. It allows asynchronous communication between client (browser) and server so web applications can retrieve data from server  in the background without interfering with the display and behavior of the existing page.</p>
<p>There are some javascript frameworks available over internet that help us to build web application easier using ajax like Prototype,  Jquery,  Dojo, etc.  For me, i prefer to use prototype because of  it&#8217;s functionality and easy to use. I&#8217;ve been using Prototype for over one year and feel comfort with it.</p>
<p>In ajax programming, we often use ajax to update parts within HTML page with the data retrived from server where in prototype i use <strong>Ajax.Request</strong> function to handle it.  But in some cases,  if  our ajax response data  contains other java script code,  and we want the script to work after the response, it won&#8217;t work.  It happens because the browser&#8217;s DOM is not updated with the newly retrieved script from ajax response. To overcome this problem, we can use <strong>Ajax.Updater</strong> function that&#8217;s a spesialization of Ajax.Request function.</p>
<p>The function:</p>
<blockquote><p><strong>new Ajax.Updater(container, url[, options])</strong></p></blockquote>
<p>where <em>container</em> is the HTML part to be updated and <em>url </em>is url to server side script.</p>
<p>Options:</p>
<table border="0">
<tbody>
<tr>
<td width="100"><strong>Options</strong></td>
<td width="100"><strong>Default</strong></td>
<td><strong>Description</strong></td>
</tr>
<tr>
<td style="width: 100px;">evalScripts</td>
<td>false</td>
<td>This determines whether <code>&lt;script&gt;</code> elements in the response  text are evaluated or not.By default, <a><code>Element.update</code></a> is  used, which replaces the whole contents of the container with the response text</td>
</tr>
<tr>
<td>insertion</td>
<td>None</td>
<td>As of Prototype 1.6.0, this notation is deprecated. Simply pass either  <code>'top'</code>, <code>'bottom'</code>, <code>'before'</code> or  <code>'after'</code> as a string instead</td>
</tr>
</tbody>
</table>
<p>Example:</p>
<pre class="brush: jscript; title: ;">
var url = 'ajax.php';

var myAjax = new Ajax.Updater('datadiv', url, {
      method: 'get',
      evalScripts: true,

      onSuccess: function(transport) {},

      onFailure: function(transport) {
           alert('Transport error!');
       }
 });
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.londatiga.net/it/prototype-using-ajax-updater-to-update-browsers-dom-element/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

