<?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>Musings - Abhay S. Kushwaha &#187; Development</title>
	<atom:link href="http://blog.kushwaha.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kushwaha.com</link>
	<description>Things from, of and about the head on the shoulders.</description>
	<lastBuildDate>Mon, 22 Feb 2010 13:09:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HTML Image Maps Tutorial for Beginners</title>
		<link>http://blog.kushwaha.com/2009/11/09/html-image-maps-tutorial-for-beginners/</link>
		<comments>http://blog.kushwaha.com/2009/11/09/html-image-maps-tutorial-for-beginners/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 14:59:31 +0000</pubDate>
		<dc:creator>Abhay S</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://blog.kushwaha.com/?p=240</guid>
		<description><![CDATA[Once upon a time, I was a member of HTML Writer&#8217;s Guild and used to participate in their mailing list discussions as well. Here&#8217;s an old post I came across today while cleaning my system that&#8217;s probably still relevant.
Notice the date on which it was written. Ancient, huh? And yes, we did write the markup [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time, I was a member of <a href="http://www.hwg.org/">HTML Writer&#8217;s Guild</a> and used to participate in their mailing list discussions as well. Here&#8217;s an old post I came across today while cleaning my system that&#8217;s probably still relevant.</p>
<p>Notice the date on which it was written. Ancient, huh? And yes, we did write the markup in CAPS back then.</p>
<p><strong>HTML Image Maps Tutorial for Beginners</strong><br />
<em>Written on Tue, 30 Dec 1997 01:55:49</em></p>
<p>When we use image maps, we are essentially defining areas of a picture as &#8220;hotspots&#8221; and the action to take when that &#8220;hotspot&#8221; is activated.</p>
<p>Let&#8217;s take an example. A car. You want it to be that when you click on the glass, it takes you to the page giving finer details of glass and when you click on the rest of the body, it takes you to finer details of how the car was painted. For this, we are going to &#8220;map&#8221; the image to different &#8220;HREF&#8221; links. How?</p>
<p>The standard, minimum recommended image tag is:<br />
<code &lt;IMG SRC="car.jpg" ALT="A car" WIDTH=100 HEIGHT=50&gt;</code></p>
<p>When we want the image to use a map, we add a "usemap" attribute. So, the image tag becomes:<br />
</code><code>&lt;IMG SRC="car.jpg" ALT="A car" WIDTH=100 HEIGHT=50 usemap="name"&gt;</code></p>
<p>Now, we are telling the image to use a map. But where is the map? We have to define it first. How do we do it? We use the &lt;MAP&gt; tag. We also have to give it a name which we will specify in the &#8220;usemap&#8221; attribute. Let&#8217;s see what I mean:</p>
<p><code>&lt;MAP NAME="CAR"&gt;<br />
&lt;/MAP&gt;</code></p>
<p>So, the image tag will be:<br />
<code>&lt;IMG SRC="car.jpg" ALT="A car" WIDTH=100 HEIGHT=50 usemap="#car"&gt;</code></p>
<p>As you might know, we use the &#8220;#&#8221; to tell the browser that the what we just referenced to exists in the same HTML document somewhere (usually people put the maps near the end of the document). So, it turns out that we use the &#8220;name&#8221; attribute in the &#8220;MAP&#8221; tag to bookmark the map and we can put a reference to this bookmark just as we would to any other standard &lt;A NAME=&#8221;name&#8221;&gt; bookmark in a HTML file. Notice something? The procedure remains the same. Only, since the content of the bookmark are mapping directions, we use &lt;MAP&gt; &#038; &lt;/MAP&gt; instead of the usual &lt;A&gt; &#038; &lt;/A&gt;. Easy till now? It gets simpler.</p>
<p>So now we know how to set a bookmark to mapping directions and we know how to call it for an image. Now we see how to &#8220;program&#8221; these directions for an image. Fine?</p>
<p>What comes between the &lt;MAP NAME=&#8221;name&#8221;&gt; &#038; &lt;/MAP&gt;? There is only one thing that can be used here &#8211; the &lt;AREA&gt; tag which defines areas on the image which refers to the map. Then we tell it which shape to use and what the coordinates,etc are for that shape. Then we specify what action to take. If no action is given, no action will be taken as a default. See? It&#8217;s simple.</p>
<p>Now you know it as well as I do that we can specify parts of an image like that only by addressing actual pixel values of the image. Let&#8217;s use our example here.</p>
<p>Remember the car image above? Its width is 100 pixels and height is 50 pixels. Let&#8217;s define two equal vertical bands. We do it by defining two rectangles using the &#8220;RECT&#8221; shape. The &#8220;COORDS&#8221; attribute is specified as left-x,top-y,right-x,down-y. Here is the map. See for yourself:</p>
<p><code>&lt;MAP NAME="car"&gt;<br />
&nbsp;&nbsp;&lt;AREA SHAPE="RECT" COORDS="1,1,50,50"   HREF="front.html"&gt;<br />
&nbsp;&nbsp;&lt;AREA SHAPE="RECT" COORDS="51,1,100,50" HREF="back.html"&gt;<br />
&lt;/MAP&gt;</code></p>
<p>Get it upto here? Let&#8217;s do it across now:</p>
<p><code>&lt;MAP NAME="car"&gt;<br />
&nbsp;&nbsp;&lt;AREA SHAPE="RECT" COORDS="1,1,100,25"  HREF="top.html"&gt;<br />
&nbsp;&nbsp;&lt;AREA SHAPE="RECT" COORDS="1,26,100,50" HREF="bottom.html"&gt;<br />
&lt;/MAP&gt;</p>
<p>Then you can map circles using SHAPE="CIRCLE" with the COORDS in the format "x-centre,y-centre,radius". A sample line:</p>
<p></code><code>&lt;MAP NAME="sample"&gt;<br />
&nbsp;&nbsp;...<br />
&nbsp;&nbsp;&lt;AREA SHAPE="CIRCLE" COORDS="10,10,10" HREF="abc.html"&gt;<br />
&nbsp;&nbsp;...<br />
&lt;/MAP&gt;</code></p>
<p>But what if you don&#8217;t want a rectangle or a circle but a triangle? To overcome this, the shape tag of &#8220;POLY&#8221; is used. It&#8217;s COORDS use pairs of x-y positions to form any shape you want.</p>
<p>For example, to make a diamond in our car and then to make is clickable, we use the map:</p>
<p><code>&lt;MAP NAME="car"&gt;<br />
&nbsp;&nbsp;&lt;AREA SHAPE="POLY" COORDS="50,1,1,25,50,50,100,25" HREF="abc.html"&gt;<br />
&lt;/MAP&gt;</code></p>
<p>The first pair, &#8220;50,1&#8243; means: 50 to the left (middle of the image) and pixel line 1 (the top of the image). The second pair, &#8220;1,25&#8243; means: 1 to the right (the extreme left of image) and 25 down (the middle of the image). And so on&#8230;</p>
<p>And if two areas overlap, the first defined takes preference. For example, if we were to make the flag of Japan clickable, we could use a map like this:</p>
<p><code>&lt;MAP NAME="JAPAN"&gt;<br />
&nbsp;&nbsp;&lt;AREA SHAPE="CIRCLE" COORDS="50,25,20"   HREF="red.html"&gt;<br />
&nbsp;&nbsp;&lt;AREA SHAPE="RECT"   COORDS="1,1,100,50" HREF="white.html"&gt;<br />
&lt;/MAP></code></p>
<p>Since we defined the circle first, on clicking that area, the action it specifies is taken.</p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kushwaha.com/2009/11/09/html-image-maps-tutorial-for-beginners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starting ColdFusion&#8230; Again</title>
		<link>http://blog.kushwaha.com/2007/07/22/starting-coldfusion-again/</link>
		<comments>http://blog.kushwaha.com/2007/07/22/starting-coldfusion-again/#comments</comments>
		<pubDate>Sat, 21 Jul 2007 23:05:53 +0000</pubDate>
		<dc:creator>Abhay S</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://blog.kushwaha.com/2007/07/22/starting-coldfusion-again/</guid>
		<description><![CDATA[Last two days I have been working in ColdFusion. This is the the second time in my life that I&#8217;m writing CFML.
A little over a couple of years ago, I was using a spreadsheet to track the work assignments to my team. It was cumbersome: others couldn&#8217;t see how I had assigned the work, when [...]]]></description>
			<content:encoded><![CDATA[<p>Last two days I have been working in <a href="http://www.adobe.com/products/coldfusion/">ColdFusion</a>. This is the the second time in my life that I&#8217;m writing <abbr title="ColdFusion Markup Language">CFML</abbr>.</p>
<p>A little over a couple of years ago, I was using a spreadsheet to track the work assignments to my team. It was cumbersome: others couldn&#8217;t see how I had assigned the work, when I was expecting what from whom, what the priorities were, and at times when the work load was high even exactly what was needed to be delivered.</p>
<p>With <a href="http://deepu-verma.blogspot.com/index.html">Deepak</a> helping me out whenever I truly got stuck I wrote a basic application that all my team members could access. It had different user levels so that only I could assign work and a few other little bits that were non-standard back then. Since the application was running on a local server, load times were instantaneous and I didn&#8217;t have to worry about a lot of things. I did it over a few nights (totalling two working days I believe). Over the next few days after I let my team on it, I kept making small changes to help make things clear so that I would not have to provide information that I could put beforehand in the work list.</p>
<p>Then I stopped.</p>
<p>There weren&#8217;t many CF coders in our office so when I wanted some advanced stuff added, I had to get it re-done in PHP. Since the benefits of the application were very visible, I got the developer time easily. A few other teams tried it out to see if they could manage their work with it too. That was flattering.</p>
<p>Anyhow, back to topic.</p>
<p>Our time tracking system is written in CFML/MSSQL and hasn&#8217;t really seen many updates recently. The reports generated are no longer suited to our current needs. Though we are able to take things forward this way or that way since the data is there, it&#8217;s a pretty time-consuming way to do things.</p>
<p>Therefore, last two days I have been working on learning SQL and trying to remember the basics of CFML. And just as last time, at the end of second day, I have my first report ready.</p>
<p>It is still as fun as it was last time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kushwaha.com/2007/07/22/starting-coldfusion-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
