<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>GrasshopperPebbles.com</title>
	
	<link>http://grasshopperpebbles.com</link>
	<description>Ajax and Ajax Frameworks</description>
	<lastBuildDate>Sat, 31 Dec 2011 04:47:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Grasshopperpebblescom" /><feedburner:info uri="grasshopperpebblescom" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nd/2.0/</creativeCommons:license><feedburner:emailServiceId>Grasshopperpebblescom</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>jQuery Plugin: imMultiLineList – A Multi-Line ListBox plugin.</title>
		<link>http://feedproxy.google.com/~r/Grasshopperpebblescom/~3/FXcW2rWJI5A/</link>
		<comments>http://grasshopperpebbles.com/ajax/jquery-plugin-immultilinelist-a-multi-line-listbox-plugin-2/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 17:36:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://grasshopperpebbles.com/?p=759</guid>
		<description><![CDATA[I have been working on a project where I needed a ListBox that displays multiple lines of information per row. The user must select from a list of offices, but many of the office names are the same and the only way to distinguish one office from the other is by the office address. Because [...]]]></description>
			<content:encoded><![CDATA[
<div class="KonaBody">
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fjquery-plugin-immultilinelist-a-multi-line-listbox-plugin-2%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fjquery-plugin-immultilinelist-a-multi-line-listbox-plugin-2%2F&amp;source=lesgreen&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I have been working on a project where I needed a ListBox that displays multiple lines of information per row. The user must select from a list of offices, but many of the office names are the same and the only way to distinguish one office from the other is by the office address. Because a ListBox does not allow multiple lines in each row, I decided to create the imMultiLineList jQuery plugin. This plugin will turn any div into a multi-line multi-select list. And because I need to interact with the plugin, I decided to create it using an Object Oriented approach.</p>
<p>The imMultiLIneList plugin is fairly simple to use. Multiple items can be added to the list ajaxally using a <a href="http://www.json.org/" target="_blank">JSON</a> object, but the plugin will also allow single items to be manually added.</p>
<p><span id="more-759"></span></p>
<h3>Options</h3>
<p>The following are the options that can be used with the imMultiLineList plugin:</p>
<p><strong>option_map:</strong> Just like a ListBox or Select (http://www.w3schools.com/tags/tag_select.asp) element, each row in the imMultiLineList plugin must have a value and display text. The option_map allows the user to define what the optionValue and optionText will be. The option_map is a mandatory option because the plugin won’t know how to parse the JSON data without this map.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p759code8'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p7598"><td class="code" id="p759code8"><pre class="javascript" style="font-family:monospace;">option_map<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;optionValue&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;optionText&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;address&quot;</span><span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>In the example above, the plugin knows when the JSON data is loaded, to use the id as the optionValue and the address as the optionText.</p>
<p><strong>item_class:</strong> Use this option to define the style for the items in the list (more on this later).</p>
<p><strong>item_hover_class:</strong> Use this option to define the hover style for the items in the list.</p>
<p><strong>item_select_class:</strong> Use this option to define the style for an item when it is selected.</p>
<p><strong>value_text_separator:</strong> This option is used when manually adding items to the list. The default value is a tilde (~).</p>
<h3>Usage</h3>
<p>Because I created the imMultiLineList plugin with an Object Oriented approach, using it requires at least two lines of code. The first line defines the options, and the second is used to initialize the plugin (A standard jQuery plugin defines the options and initializes in a single step).</p>
<h3>Adding Items</h3>
<p>Use the addItems method to add multiple items to the list. When adding multiple items, the data that is loaded must be in the JSON format.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p759code9'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p7599"><td class="code" id="p759code9"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> addressList <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#listCntnr&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imMultiLineList</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		option_map<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;optionValue&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;optionText&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;address&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		item_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;multiListItem&quot;</span><span style="color: #339933;">,</span>
		item_hover_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;multiListItemHover&quot;</span><span style="color: #339933;">,</span>
		item_select_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">'multiListItemSelect'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	addressList.<span style="color: #660066;">addItems</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'assets/js/jquery/immultilinelist/address.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The <strong>addItems</strong> method takes a single argument – the url where you intend to retrieve the JSON object. The option_map option must be set prior to loading the data. In the example above, the plugin will try to parse the id and address:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p759code10'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p75910"><td class="code" id="p759code10"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;1&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;address&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Ben<span style="color: #000099; font-weight: bold;">\'</span>s Chilli Bowl&lt;br /&gt;1213 U St NW Washington, DC&lt;br /&gt;20009&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span></pre></td></tr></table></div>

<p>Notice the <strong>br</strong> tags. This is how I create the multiple lines. In fact, the plugin will accept any html, so you could also add images or any other html element.</p>
<h3>Add Single Item</h3>
<p>The plugin will also you to manually load a single item to the list. The item added can be one of the following:</p>
<ol>
<li><strong>A JSON object</strong> &#8211; The JSON must be created with the same data map options:
<pre>{"id": "1", "address": "111 Whatever Street, This City, MD 22222"}</pre>
</li>
<li><strong>Any string value</strong> &#8211; If the <strong>optionText</strong> is not a JSON object, the imMultiLineList plugin will use the value to create a JSON object. The <strong>option_map</strong> option <strong>optionValue</strong> can be entered with the optionText value.
<ul>
<li>To specify the optionValue, add the value to end of the string and separate the optionText and optionValue with a tilde (~).
<pre>111 Whatever Street, This City, MD 22222~5</pre>
<p>
				<strong>Note:</strong> The tilde can be changed by adding the <strong>value_text_separator</strong> option.
				</li>
<li>If the optionValue is not part of the string, the imMultiLneList plugin will calculate the value based upon the number of items in the list.</li>
</ul>
</li>
</ol>
<p>In the example below, I add multiple items using the addItems method. I then add a single item from an input field when the user clicks on a button.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p759code11'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p75911"><td class="code" id="p759code11"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> addressList <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#listCntnr&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imMultiLineList</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		option_map<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;optionValue&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;optionText&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;address&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		item_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;multiListItem&quot;</span><span style="color: #339933;">,</span>
		item_hover_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;multiListItemHover&quot;</span><span style="color: #339933;">,</span>
		item_select_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">'multiListItemSelect'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	addressList.<span style="color: #660066;">addItems</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'assets/js/jquery/immultilinelist/address.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#theButton'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		addressList.<span style="color: #660066;">addItem</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#theText'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Get Selected Items</h3>
<p>Just like any other ListBox or select, the imMultiLineList plugin allows the developer to retrieve the selected option value and text using the <strong>getSelectedItems</strong> method. The method will return a multi-dimensional array that contains two members: <strong>value</strong> and <strong>text</strong>.</p>
<p><strong>Note:</strong> Just like a ListBox, use cntrl-click (cmd-click on Mac) to select multiple items or use shift-click to select a range of items.</p>
<p>In the example below, I retrieve the selected items and then place the value and text inside a div.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p759code12'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p75912"><td class="code" id="p759code12"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> addressList <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#listCntnr&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imMultiLineList</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		option_map<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;optionValue&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;optionText&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;address&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		item_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;multiListItem&quot;</span><span style="color: #339933;">,</span>
		item_hover_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;multiListItemHover&quot;</span><span style="color: #339933;">,</span>
		item_select_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">'multiListItemSelect'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	addressList.<span style="color: #660066;">addItems</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'assets/js/jquery/immultilinelist/address.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#theButton'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> addresses <span style="color: #339933;">=</span> addressList.<span style="color: #660066;">getSelectedItems</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>addresses<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span>itm<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#selectedCntnr'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span>itm.<span style="color: #660066;">value</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;br /&gt;'</span> <span style="color: #339933;">+</span> itm.<span style="color: #660066;">text</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;br /&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Remove Selected Items</h3>
<p>Although this may not be useful in most situations, I decided to add the ability to remove selected items from the list. Removing selected items is fairly straightforward – use the <strong>removeSelectedItems</strong> method.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p759code13'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p75913"><td class="code" id="p759code13"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> addressList <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#listCntnr&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imMultiLineList</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		option_map<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;optionValue&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;optionText&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;address&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		item_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;multiListItem&quot;</span><span style="color: #339933;">,</span>
		item_hover_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;multiListItemHover&quot;</span><span style="color: #339933;">,</span>
		item_select_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">'multiListItemSelect'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	addressList.<span style="color: #660066;">addItems</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'assets/js/jquery/immultilinelist/address.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#theButton'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		addressList.<span style="color: #660066;">removeSelectedItems</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>CSS</h3>
<p>The list can be styled to your liking. The following is the CSS that I used to create the examples in the <a href="http://grasshopperpepbbles.com/demos" target="_blank">demos</a>:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p759code14'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p75914"><td class="code" id="p759code14"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#listCntnr</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">thin</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;arial&quot;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.multiListItem</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span><span style="color: #00AA00;">;</span>
	-moz-user-select<span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	-khtml-user-select<span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	user-select<span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.multiListItemHover</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#BDE1F2</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span><span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.multiListItemSelect</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">blue</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>This styling is fairly simple. The listCntnr is the ListBox container. The other styles define the CSS for the item (multiListItem), item hover (multiListItemHover) and select (multiListItemSelect) states. Note that the multiListItem defines user-select attributes. If these attributes are not defined, when a user shift-clicks multiple items, the browser will select the text within each item. </p>
<h3>Demos</h3>
<p>A demo of this plugin can be viewed in the <a href="http://grasshopperpebbles.com/demos" target="_blank">demo</a> section of this site.</p>
<p>The plugin can be downloaded from <a href="https://github.com/lesgreen/imMultiLineList" target="_blank">GitHub</a>.</p>
<p>Enjoy.</p>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
</div> <!-- KonaBody -->
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fjquery-plugin-immultilinelist-a-multi-line-listbox-plugin-2%2F&amp;title=jQuery%20Plugin%3A%20imMultiLineList%20%26%238211%3B%20A%20Multi-Line%20ListBox%20plugin." id="wpa2a_2"><img src="http://grasshopperpebbles.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=FXcW2rWJI5A:fwa7LZj4RVo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=FXcW2rWJI5A:fwa7LZj4RVo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=FXcW2rWJI5A:fwa7LZj4RVo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=FXcW2rWJI5A:fwa7LZj4RVo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=FXcW2rWJI5A:fwa7LZj4RVo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=FXcW2rWJI5A:fwa7LZj4RVo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=FXcW2rWJI5A:fwa7LZj4RVo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=FXcW2rWJI5A:fwa7LZj4RVo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=FXcW2rWJI5A:fwa7LZj4RVo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=FXcW2rWJI5A:fwa7LZj4RVo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=FXcW2rWJI5A:fwa7LZj4RVo:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=FXcW2rWJI5A:fwa7LZj4RVo:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=FXcW2rWJI5A:fwa7LZj4RVo:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=FXcW2rWJI5A:fwa7LZj4RVo:KwTdNBX3Jqk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Grasshopperpebblescom/~4/FXcW2rWJI5A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://grasshopperpebbles.com/ajax/jquery-plugin-immultilinelist-a-multi-line-listbox-plugin-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://grasshopperpebbles.com/ajax/jquery-plugin-immultilinelist-a-multi-line-listbox-plugin-2/</feedburner:origLink></item>
		<item>
		<title>HTML5 and CSS3 Browser Support</title>
		<link>http://feedproxy.google.com/~r/Grasshopperpebblescom/~3/PCdNhJX23H0/</link>
		<comments>http://grasshopperpebbles.com/css/html5-and-css3-browser-support/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 18:10:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cool Sites]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://grasshopperpebbles.com/?p=740</guid>
		<description><![CDATA[I just stumbled on a cool site &#8211; html5readiness.com. The site displays a break down of browser support for HTML5 and CSS3 (Canvas, SVG, GeoLocation, Transforms, Border Radius, etc). The browsers included for 2010 are IE 7, IE 8, IE 9, FireFox 3.5, FireFox 3.7, Opera 10.50, Safari 4, and Chrome 4. I wasn&#8217;t surprised [...]]]></description>
			<content:encoded><![CDATA[
<div class="KonaBody">
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fcss%2Fhtml5-and-css3-browser-support%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fcss%2Fhtml5-and-css3-browser-support%2F&amp;source=lesgreen&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I just stumbled on a cool site &#8211; <a href="http://html5readiness.com/" target="_blank">html5readiness.com</a>. The site displays a break down of browser support for HTML5 and CSS3 (Canvas, SVG, GeoLocation, Transforms, Border Radius, etc). The browsers included for 2010 are IE 7, IE 8, IE 9, FireFox 3.5, FireFox 3.7, Opera 10.50, Safari 4, and Chrome 4. </p>
<p>I wasn&#8217;t surprised to find that Safari and Chrome have the most HTML5 and CSS3 support (since both use the webkit engine). Firefox support for HTML5 and CSS3 is not far behind Safari and Chrome.</p>
<p>I was not surprised to find that Internet Explorer lags far behind (although IE 9 adds support for SVG, Video, SVG as Background, Media Queries).</p>
<p>I was very surprised to find that HTML5 and CSS3 support in Opera 10.50 rivals that of FireFox. </p>
<p>Anyway, if you ever need to know what is supported by each browser, take a look at <a href="http://html5readiness.com/" target="_blank">html5readiness.com</a>.</p>
<p>P.S. I wonder why Safari and Opera aren&#8217;t used as much as Firefox, Chrome and IE. Safari can be used with a Mac or PC, but appears to be used primarily by Mac users. Chrome has been around since 2008 and already has 5 times as many users as Safari (see <a href="http://www.w3schools.com/browsers/browsers_stats.asp" target="_blank">browser stats</a>). </p>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
</div> <!-- KonaBody -->
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrasshopperpebbles.com%2Fcss%2Fhtml5-and-css3-browser-support%2F&amp;title=HTML5%20and%20CSS3%20Browser%20Support" id="wpa2a_4"><img src="http://grasshopperpebbles.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=PCdNhJX23H0:LFx1rFLbAsY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=PCdNhJX23H0:LFx1rFLbAsY:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=PCdNhJX23H0:LFx1rFLbAsY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=PCdNhJX23H0:LFx1rFLbAsY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=PCdNhJX23H0:LFx1rFLbAsY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=PCdNhJX23H0:LFx1rFLbAsY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=PCdNhJX23H0:LFx1rFLbAsY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=PCdNhJX23H0:LFx1rFLbAsY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=PCdNhJX23H0:LFx1rFLbAsY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=PCdNhJX23H0:LFx1rFLbAsY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=PCdNhJX23H0:LFx1rFLbAsY:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=PCdNhJX23H0:LFx1rFLbAsY:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=PCdNhJX23H0:LFx1rFLbAsY:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=PCdNhJX23H0:LFx1rFLbAsY:KwTdNBX3Jqk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Grasshopperpebblescom/~4/PCdNhJX23H0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://grasshopperpebbles.com/css/html5-and-css3-browser-support/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://grasshopperpebbles.com/css/html5-and-css3-browser-support/</feedburner:origLink></item>
		<item>
		<title>gpDojoGallery: A Dojo Photo Gallery Widget</title>
		<link>http://feedproxy.google.com/~r/Grasshopperpebblescom/~3/l1O4ubm6Dpo/</link>
		<comments>http://grasshopperpebbles.com/ajax/gpdojogallery-a-dojo-photo-gallery-widget/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 16:20:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Dojo]]></category>
		<category><![CDATA[dojo-widgets]]></category>
		<category><![CDATA[Dojo Toolkit]]></category>
		<category><![CDATA[galleries.digitalvilliage.com]]></category>
		<category><![CDATA[Javascript Framework]]></category>
		<category><![CDATA[Photo Gallery]]></category>

		<guid isPermaLink="false">http://grasshopperpebbles.com/?p=738</guid>
		<description><![CDATA[I added a new photo gallery to galleries.digitalvilliage.com. I created the Photo Gallery widget using Dojo Toolkit about a year ago for a project that I have been working on. I recently updated to give it more options than I needed for my project. The gpDojoGallery widget can be set to display thumbnail images in [...]]]></description>
			<content:encoded><![CDATA[
<div class="KonaBody">
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fgpdojogallery-a-dojo-photo-gallery-widget%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fgpdojogallery-a-dojo-photo-gallery-widget%2F&amp;source=lesgreen&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I added a new photo gallery to <a href="http://galleries.digitalvilliage.com/dojogallery" target="_blank">galleries.digitalvilliage.com</a>. I created the Photo Gallery widget using <a href="http://dojotoolkit.org/" target="_blank">Dojo Toolkit</a> about a year ago for a project that I have been working on. I recently updated to give it more options than I needed for my project.  </p>
<p>The gpDojoGallery widget can be set to display thumbnail images in the center, left, right, top, or bottom of the page. When the thumbnails are set to the center position, the <a href="http://dojotoolkit.org/reference-guide/dojox/image/Lightbox.html#dojox-image-lightbox" target="_blank">dojox.image.Lightbox</a> module can be used to display the large image. </p>
<p>The widget receives a JSON object that contains the image information (location, width, height, etc). I store the information using <a href="http://dojotoolkit.org/reference-guide/dojo/data/ItemFileReadStore.html#dojo-data-itemfilereadstore" target="_blank">dojo.data.ItemFileReadStore</a>, so it was easy to add a pics-per-page option just be limiting the number items to be read within the store.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p738code16'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73816"><td class="code" id="p738code16"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">picsPerPage</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	request <span style="color: #339933;">=</span> imageStore.<span style="color: #660066;">fetch</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>onBegin<span style="color: #339933;">:</span> startFetch<span style="color: #339933;">,</span> <span style="color: #000066;">onError</span><span style="color: #339933;">:</span> fetchFailed<span style="color: #339933;">,</span> onComplete<span style="color: #339933;">:</span> initGallery<span style="color: #339933;">,</span> start<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> count<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">picsPerPage</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>  <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
	request <span style="color: #339933;">=</span> imageStore.<span style="color: #660066;">fetch</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>onBegin<span style="color: #339933;">:</span> startFetch<span style="color: #339933;">,</span> <span style="color: #000066;">onError</span><span style="color: #339933;">:</span> fetchFailed<span style="color: #339933;">,</span> onComplete<span style="color: #339933;">:</span> initGallery<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The gpDojoGallery widget was fairly simple to create, but it has enough options to be a very versatile photo gallery. You can view demos on my <a href="http://galleries.digitalvilliage.com/dojogallery" target="_blank">digitalvilliage.com</a> site. The widget (and demos) can be downloaded from <a href="http://github.com/lesgreen/gpDojoGallery" target="_blank">GitHub</a>. </p>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
</div> <!-- KonaBody -->
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fgpdojogallery-a-dojo-photo-gallery-widget%2F&amp;title=gpDojoGallery%3A%20A%20Dojo%20Photo%20Gallery%20Widget" id="wpa2a_6"><img src="http://grasshopperpebbles.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=l1O4ubm6Dpo:Rm6ADCVQxxA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=l1O4ubm6Dpo:Rm6ADCVQxxA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=l1O4ubm6Dpo:Rm6ADCVQxxA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=l1O4ubm6Dpo:Rm6ADCVQxxA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=l1O4ubm6Dpo:Rm6ADCVQxxA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=l1O4ubm6Dpo:Rm6ADCVQxxA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=l1O4ubm6Dpo:Rm6ADCVQxxA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=l1O4ubm6Dpo:Rm6ADCVQxxA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=l1O4ubm6Dpo:Rm6ADCVQxxA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=l1O4ubm6Dpo:Rm6ADCVQxxA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=l1O4ubm6Dpo:Rm6ADCVQxxA:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=l1O4ubm6Dpo:Rm6ADCVQxxA:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=l1O4ubm6Dpo:Rm6ADCVQxxA:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=l1O4ubm6Dpo:Rm6ADCVQxxA:KwTdNBX3Jqk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Grasshopperpebblescom/~4/l1O4ubm6Dpo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://grasshopperpebbles.com/ajax/gpdojogallery-a-dojo-photo-gallery-widget/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://grasshopperpebbles.com/ajax/gpdojogallery-a-dojo-photo-gallery-widget/</feedburner:origLink></item>
		<item>
		<title>gpDojoPortfolio: A Dojo Portfolio Widget</title>
		<link>http://feedproxy.google.com/~r/Grasshopperpebblescom/~3/pQhmgGiWwCQ/</link>
		<comments>http://grasshopperpebbles.com/ajax/gpdojoportfolio-a-dojo-portfolio-widget/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 21:20:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Dojo]]></category>
		<category><![CDATA[dojo-widgets]]></category>
		<category><![CDATA[Ajax Framework]]></category>
		<category><![CDATA[Dojo Toolkit]]></category>
		<category><![CDATA[Dojo widgets]]></category>

		<guid isPermaLink="false">http://grasshopperpebbles.com/?p=735</guid>
		<description><![CDATA[I&#8217;m working on a new project that uses Dojo Toolkit and DJango. I haven&#8217;t started on the DJango back-end yet because I first need to create a few Dojo widgets. The first widget that I created is gpDojoPortfolio. As the name suggests, this widget will display a portfolio. Each item in the portfolio slides into [...]]]></description>
			<content:encoded><![CDATA[
<div class="KonaBody">
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fgpdojoportfolio-a-dojo-portfolio-widget%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fgpdojoportfolio-a-dojo-portfolio-widget%2F&amp;source=lesgreen&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;m working on a new project that uses <a href="http://www.dojotoolkit.org/" target="_blank">Dojo Toolkit</a> and DJango. I haven&#8217;t started on the DJango back-end yet because I first need to create a few Dojo widgets. The first widget that I created is <strong>gpDojoPortfolio</strong>. As the name suggests, this widget will display a portfolio. Each item in the portfolio slides into view using the <a href="http://www.dojotoolkit.org/reference-guide/dojo/fx.html#dojo-fx" target="_blank">dojo.fx</a> module.  </p>
<p><span id="more-735"></span></p>
<h3>gpDojoPortfolio Container</h3>
<p>To provide content for the widget, you must first create a container. You must provide an <strong>id</strong> for the container. You can optionally provide a <strong>class</strong>.</p>
<blockquote><p><strong>Note:</strong> I created the widget so that multiple portfolio&#8217;s can be displayed on a page. If you plan to display multiple portfolio&#8217;s, then I suggest that you create a class for the container.</p></blockquote>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code35'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73535"><td class="code" id="p735code35"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;gpPortfolioCntnr&quot; class=&quot;gpPortfolioCntnr&quot;&gt;
&nbsp;
&lt;/div&gt;</pre></td></tr></table></div>

<h3>Portfolio Title</h3>
<p>If you want a title to be displayed on top of the portfolio, you must use an <strong>h1</strong> tag.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code36'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73536"><td class="code" id="p735code36"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;gpPortfolioCntnr&quot; class=&quot;gpPortfolioCntnr&quot;&gt;
        &lt;h1&gt;This is my portfolio&lt;/h1&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<h3>Portfolio Items</h3>
<p>Each portfolio item is contained within a div. You must provide a class name for this div. In the example below, I named the div <strong>gpPortfolioItem</strong>.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code37'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73537"><td class="code" id="p735code37"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;gpPortfolioCntnr&quot; class=&quot;gpPortfolioCntnr&quot;&gt;
        &lt;h1&gt;This is my portfolio&lt;/h1&gt;
        &lt;div class=&quot;gpPortfolioItem&quot;&gt;
&nbsp;
        &lt;/div&gt;
        &lt;div class=&quot;gpPortfolioItem&quot;&gt;
&nbsp;
        &lt;/div&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>Each portfolio item contains two display segments &#8211; a left display and a right display. For instance, I may want to display an image in the left display and a description in the right display. You must wrap each display segment with <strong>li</strong> tags. The widget will convert these into the left and right display &#8211; the first <strong>li</strong> will be on the left and the second will be on the right.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code38'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73538"><td class="code" id="p735code38"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;gpPortfolioCntnr&quot; class=&quot;gpPortfolioCntnr&quot;&gt;
        &lt;h1&gt;This is my portfolio&lt;/h1&gt;
        &lt;div class=&quot;gpPortfolioItem&quot;&gt;
                &lt;ul&gt;
			&lt;li&gt;
				&lt;a href=&quot;http://web2.digitalvilliage.com&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;images/portfolio/dvilliage.jpg&quot; width=&quot;355px&quot; height=&quot;200px&quot; /&gt;&lt;/a&gt;
			&lt;/li&gt;
			&lt;li&gt;
				&lt;h3&gt;DigitalVillage.com&lt;/h3&gt;
				&lt;p&gt;DigitalVilliage.com is one of our sites. The site has two subdomains (web20 and galleries). The web20 site will generate web 2.0 domain names (and search for availability). &lt;/p&gt;
				&lt;p&gt;You can also generate color harmonies from a Web 2.0 pallette, a Web216 pallette, or a selected image (or random Flickr image). &lt;/p&gt;
				&lt;p&gt;The galleries site displays a free Flash/XML photo gallery. &lt;br/&gt;We developed this site using CakePHP, JQuery and Flash/AS3.&lt;/p&gt;
				&lt;p&gt;Click &lt;a href=&quot;http://web2.digitalvilliage.com&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; to view the site.&lt;/p&gt;
			&lt;/li&gt;
		&lt;/ul&gt;
        &lt;/div&gt;
        &lt;div class=&quot;gpPortfolioItem&quot;&gt;
                &lt;ul&gt;
			&lt;li&gt;
				&lt;a href=&quot;http://grasshopperpebbles.com&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;images/portfolio/gpebbles.jpg&quot; width=&quot;350px&quot; height=&quot;200px&quot; /&gt;&lt;/a&gt;
			&lt;/li&gt;
			&lt;li&gt;
				&lt;h3&gt;GrasshopperPebbles.com&lt;/h3&gt;
				&lt;p&gt;Grasshopperpebbles.com is our blog site. This blog focuses on Ajax Frameworks such as jQuery, YUI, and Dojo, but I also discuss other web technologies such as PHP, CSS, Flash, etc. &lt;/p&gt;
				&lt;p&gt;We developed this site using Wordpress and jQuery. We developed the demos section of the site using CodeIgniter.&lt;/p&gt;
				&lt;p&gt;Click &lt;a href=&quot;http://grasshopperpebbles.com&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; to view the site.&lt;/p&gt;
			&lt;/li&gt;
		&lt;/ul&gt;
        &lt;/div&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<h3>Setting Up the gpDojoPortfolio Widget</h3>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code39'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73539"><td class="code" id="p735code39"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;js/gpWidgets/gpDojoPortfolio/css/styles.css&quot;&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;demo.css&quot;&gt;
&nbsp;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/dojo/dojo.js&quot; djConfig=&quot;parseOnLoad: true, modulePaths:{'gp':'../gpWidgets/gpDojoPortfolio'}&quot;&gt;&lt;/script&gt;
&nbsp;
&lt;script type=&quot;text/javascript&quot;&gt;
	dojo.require(&quot;gp.gpDojoPortfolio&quot;);
&nbsp;
	dojo.addOnLoad(function() {
		var ga = new gp.gpDojoPortfolio({},'gpPortfolioCntnr');
	});
&lt;/script&gt;</pre></td></tr></table></div>

<blockquote><p><strong>Note:</strong> When setting up the widget, you should not make changes to the widget&#8217;s CSS file, instead, you should provide a separate CSS file. In the example above, I created a file named <strong>demo.css</strong>. More on this later in the post.
</p></blockquote>
<h3>Widget Options</h3>
<p>The gpDojoPortfolio widget only has a few options: </p>
<p><strong>portfolio_items:</strong> This option is the class name of the portfolio items. The class name is not used in the construction of the widget, so there is really no need to change it.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code40'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73540"><td class="code" id="p735code40"><pre class="javascript" style="font-family:monospace;">dojo.<span style="color: #660066;">addOnLoad</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> ga <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> gp.<span style="color: #660066;">gpDojoPortfolio</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>portfolio_items<span style="color: #339933;">:</span> <span style="color: #3366CC;">'.myItems'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'gpPortfolioCntnr'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>


<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code41'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73541"><td class="code" id="p735code41"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;gpPortfolioCntnr&quot; class=&quot;gpPortfolioCntnr&quot;&gt;
        &lt;h1&gt;This is my portfolio&lt;/h1&gt;
        &lt;div class=&quot;myItems&quot;&gt;
&nbsp;
        &lt;/div&gt;
        &lt;div class=&quot;myItems&quot;&gt;
&nbsp;
        &lt;/div&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p><strong>title_class:</strong> I created this option for those who plan to create multiple portfolio&#8217;s on page and want to style each title (h1) tag differently. The default value is <strong>gpPortfolio-Title</strong>.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code42'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73542"><td class="code" id="p735code42"><pre class="javascript" style="font-family:monospace;">dojo.<span style="color: #660066;">addOnLoad</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> ga <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> gp.<span style="color: #660066;">gpDojoPortfolio</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'gpPortfolioCntnr'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> ga2 <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> gp.<span style="color: #660066;">gpDojoPortfolio</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>title_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">'blueTitle'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'gpPortfolioCntnr2'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><strong>show_side_nav:</strong> Use this option to show/hide the side navigation. The default is <strong>true</strong>.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code43'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73543"><td class="code" id="p735code43"><pre class="javascript" style="font-family:monospace;">dojo.<span style="color: #660066;">addOnLoad</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> ga <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> gp.<span style="color: #660066;">gpDojoPortfolio</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>show_side_nav<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'gpPortfolioCntnr'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><strong>interval:</strong> Use this option to have portfolio automatically slide to the next portfolio item. This value is in milliseconds. When using this option, I usually hide the side navigation.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code44'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73544"><td class="code" id="p735code44"><pre class="javascript" style="font-family:monospace;">dojo.<span style="color: #660066;">addOnLoad</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> ga <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> gp.<span style="color: #660066;">gpDojoPortfolio</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>interval<span style="color: #339933;">:</span> <span style="color: #CC0000;">6000</span><span style="color: #339933;">,</span> show_side_nav<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'gpPortfolioCntnr'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p><strong>anim_duration:</strong> How long, in milliseconds, the slide animation will occur (when sliding to the next portfolio item). The default is 1000.<br />
<strong>anim_easing:</strong> The easing function to be applied to the animation. The default is <strong>elasticOut</strong>. For more options, see <a href="http://www.dojotoolkit.org/reference-guide/dojo/fx/easing.html#dojo-fx-easing" target="_blank">dojo.fx.easing</a>.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code45'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73545"><td class="code" id="p735code45"><pre class="javascript" style="font-family:monospace;">dojo.<span style="color: #660066;">addOnLoad</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> ga <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> gp.<span style="color: #660066;">gpDojoPortfolio</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>anim_duration<span style="color: #339933;">:</span> <span style="color: #CC0000;">2000</span><span style="color: #339933;">,</span> anim_easing<span style="color: #339933;">:</span> <span style="color: #3366CC;">'quadIn'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'gpPortfolioCntnr'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Styling the Widget</h3>
<p>You should create a separate CSS file to style the widget so that there will be no confusion if I ever create a new version. </p>
<p>To change the overall dimensions of the widget, update the following styles:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code46'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73546"><td class="code" id="p735code46"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#gpPortfolioCntnr</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">900px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.gpPortfolio-SlideCntnr</span> <span style="color: #00AA00;">&#123;</span>
       <span style="color: #808080; font-style: italic;">/* The container width - the width of the navigation (x 2) */</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">820px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.gpPortfolio-DisplayCntnr</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #808080; font-style: italic;">/* The container width - the width of the navigation (x 2) */</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">820px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>The container that does the actual sliding has a default width of <strong>5000px</strong>. Depending upon the number of display items, you may want to increase this value:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code47'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73547"><td class="code" id="p735code47"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.gpPortfolio-Slider</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">10000px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>The following is the default styling of the left and right display:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code48'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73548"><td class="code" id="p735code48"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.gpPortfolio-LeftItem</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.gpPortfolio-RightItem</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">390px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">360px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>The following is the default styling for the side navigation container and images:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code49'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73549"><td class="code" id="p735code49"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.gpPortfolio-Side-Nav</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">40px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">425px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.gpPortfolio-PrevBtn</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.gpPortfolio-NextBtn</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">32px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">32px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span><span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">../images/previous.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">120px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.gpPortfolio-NextBtn</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">../images/next.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>The top navigation (circle navigation) can be changed as well. The default images are grey.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code50'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73550"><td class="code" id="p735code50"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.gpPortfolioCntnr</span> h1 ul<span style="color: #6666ff;">.gpPortfolio-Top-Nav</span> li <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/dot-nav-grey.gif&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span><span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">9px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">9px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.gpPortfolioCntnr</span> h1 ul<span style="color: #6666ff;">.gpPortfolio-Top-Nav</span> li span <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/dot-nav-grey.gif&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-9px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">9px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">9px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>I have provided a number of other colors (black&#038;white, blue, green, orange, and red), but you can also create your own.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code51'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73551"><td class="code" id="p735code51"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.gpPortfolioCntnr</span> h1 ul<span style="color: #6666ff;">.gpPortfolio-Top-Nav</span> li <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/dot-nav-blue.gif&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.gpPortfolioCntnr</span> h1 ul<span style="color: #6666ff;">.gpPortfolio-Top-Nav</span> li span <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../images/dot-nav-blue.gif&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>The following is the CSS file that I created for the gpDojoPortfolio demo &#8211; much of the styling changes will occur in the left and right displays.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p735code52'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73552"><td class="code" id="p735code52"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.gpPortfolio-LeftItem</span> IMG <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.gpPortfolio-RightItem</span> h3 <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#0239a4</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.gpPortfolioCntnr</span> h1<span style="color: #6666ff;">.gpPortfolio-Title</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#0239a4</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Arial</span><span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#0239a4</span><span style="color: #00AA00;">;</span>	
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>That&#8217;s it. The gpDojoPortfolio widget is fairly easy to use. You can view a demo in the <a href="http://grasshopperpebbles.com/demos/index.php/welcome/dojo" target="_blank">dojo demo</a> section of my site. You can download the widget from <a href="http://github.com/lesgreen/gpDojoPortfolio" target="_blank">GitHub</a>. </p>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
</div> <!-- KonaBody -->
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fgpdojoportfolio-a-dojo-portfolio-widget%2F&amp;title=gpDojoPortfolio%3A%20A%20Dojo%20Portfolio%20Widget" id="wpa2a_8"><img src="http://grasshopperpebbles.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=pQhmgGiWwCQ:BEFUasbHftk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=pQhmgGiWwCQ:BEFUasbHftk:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=pQhmgGiWwCQ:BEFUasbHftk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=pQhmgGiWwCQ:BEFUasbHftk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=pQhmgGiWwCQ:BEFUasbHftk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=pQhmgGiWwCQ:BEFUasbHftk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=pQhmgGiWwCQ:BEFUasbHftk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=pQhmgGiWwCQ:BEFUasbHftk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=pQhmgGiWwCQ:BEFUasbHftk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=pQhmgGiWwCQ:BEFUasbHftk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=pQhmgGiWwCQ:BEFUasbHftk:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=pQhmgGiWwCQ:BEFUasbHftk:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=pQhmgGiWwCQ:BEFUasbHftk:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=pQhmgGiWwCQ:BEFUasbHftk:KwTdNBX3Jqk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Grasshopperpebblescom/~4/pQhmgGiWwCQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://grasshopperpebbles.com/ajax/gpdojoportfolio-a-dojo-portfolio-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://grasshopperpebbles.com/ajax/gpdojoportfolio-a-dojo-portfolio-widget/</feedburner:origLink></item>
		<item>
		<title>ui.imFeedBack – A JQuery UI Feedback Widget</title>
		<link>http://feedproxy.google.com/~r/Grasshopperpebblescom/~3/fT9PZmaIOZY/</link>
		<comments>http://grasshopperpebbles.com/ajax/ui-imfeedback-a-jquery-ui-feedback-widget/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 23:47:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[UI Widgets]]></category>
		<category><![CDATA[Feedback]]></category>
		<category><![CDATA[JQuery UI]]></category>
		<category><![CDATA[Json]]></category>
		<category><![CDATA[themeroller]]></category>
		<category><![CDATA[Widget]]></category>

		<guid isPermaLink="false">http://grasshopperpebbles.com/?p=730</guid>
		<description><![CDATA[When the web20.digitalvilliage site was nearly complete, I wanted to add a contact form. I like the feedback tabs that I have been seeing on websites recently (displayed on the right or left of the page), so I decided to build one. I was already using a JQuery UI theme on the site, so I [...]]]></description>
			<content:encoded><![CDATA[
<div class="KonaBody">
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fui-imfeedback-a-jquery-ui-feedback-widget%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fui-imfeedback-a-jquery-ui-feedback-widget%2F&amp;source=lesgreen&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>When the <a href="http://web20.digitalvilliage.com" target="_blank">web20.digitalvilliage</a> site was nearly complete, I wanted to add a contact form. I like the feedback tabs that I have been seeing on websites recently (displayed on the right or left of the page), so I decided to build one. I was already using a <a href="http://jqueryui.com/" target="_blank">JQuery UI</a> theme on the site, so I decided to create a JQuery UI widget so that the color scheme of the feedback form would match the color scheme on the site. </p>
<p>This <strong>ui.imFeedBack</strong> widget is extremely versatile. The feedback tab can be placed on the right or left and can even be displayed as a dialog.</p>
<p><span id="more-730"></span></p>
<h3>Creating a JQuery UI Theme</h3>
<p>Before setting up the widget, create a theme with the JQuery UI <a href="http://jqueryui.com/themeroller/" target="_blank">Themeroller</a>. I discuss the themeroller in a previous <a href="http://grasshopperpebbles.com/ajax/using-the-jquery-ui-part-1/" target="_blank">post</a>.</p>
<h3>Setting up the ui.imFeedBack Widget</h3>
<p>First add the necessary CSS and JS files to the head section of your web page:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code70'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73070"><td class="code" id="p730code70"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/jquery-ui/custom-theme/jquery-ui-custom.css&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/imfeedback/imfeedback.css&quot; /&gt;
&nbsp;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery/jquery-ui/jquery-ui.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery/imfeedback/ui.imFeedBack-0.5.js&quot;&gt;&lt;/script&gt;</pre></td></tr></table></div>

<p>The only option that is needed in order to use the ui.imFeedBack widget is the <strong>submit_url</strong>. This is the location of your server-side script that sends the email.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code71'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73071"><td class="code" id="p730code71"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imFeedBack</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		submit_url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://www.mysite.com/send_mail.php'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This will create the FeedBack tab on the right of the page. When the user clicks on the tab, the feedback form will slide open. If I prefer to display the feedback tab on the left:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code72'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73072"><td class="code" id="p730code72"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imFeedBack</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                location<span style="color: #339933;">:</span> <span style="color: #3366CC;">'left'</span><span style="color: #339933;">,</span>
		submit_url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://www.mysite.com/send_mail.php'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Changing CSS Styles</h3>
<p>The ui.imFeedBack widget is set up to automatically use a JQuery UI theme, but I set it up so that it can be styled independently. The following are the options that can be used to change the styling of the widget.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code73'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73073"><td class="code" id="p730code73"><pre class="javascript" style="font-family:monospace;">form_container_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">'ui-widget ui-widget-content ui-corner-all'</span>
<span style="color: #006600; font-style: italic;">// The form buttons are the send and close buttons</span>
form_button_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">'fg-button ui-state-default ui-corner-all'</span>
form_button_class_hover<span style="color: #339933;">:</span> <span style="color: #3366CC;">'ui-state-hover'</span>
<span style="color: #006600; font-style: italic;">// The header class is the caption container</span>
header_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">'ui-widget-header ui-corner-top'</span>
<span style="color: #006600; font-style: italic;">// The feedback_button is the feedback tab that is displayed on the left or right</span>
feedback_button_class<span style="color: #339933;">:</span> <span style="color: #3366CC;">'fg-button ui-state-default ui-corner-top'</span> 
feedback_button_class_hover<span style="color: #339933;">:</span> <span style="color: #3366CC;">'ui-state-hover'</span></pre></td></tr></table></div>

<h3>Sending the User&#8217;s Name</h3>
<p>By default, the feedback form contains an <strong>email</strong>, <strong>subject</strong>, and <strong>message</strong> field. To display a name field, use the <strong>form_capture_name</strong> option. There are 4 possible values for this option:</p>
<p><strong>false:</strong> Name fields are not displayed (the default)<br /> <br />
<strong>firstName:</strong> A First Name field is displayed<br />
<strong>fullName:</strong> A single input input field is displayed where the user can enter their full name<br />
<strong>firstLast:</strong> First name and last name fields are displayed</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code74'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73074"><td class="code" id="p730code74"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imFeedBack</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                form_capture_name<span style="color: #339933;">:</span> <span style="color: #3366CC;">'firstName'</span><span style="color: #339933;">,</span>
		submit_url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://www.mysite.com/send_mail.php'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The ui.imFeedBack widget will validate the form fields by default (value must not be blank and email must be correct format). You have the option of turning off the validation of the name field using the <strong>validate_name</strong> option.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code75'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73075"><td class="code" id="p730code75"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imFeedBack</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                form_capture_name<span style="color: #339933;">:</span> <span style="color: #3366CC;">'firstName'</span><span style="color: #339933;">,</span>
                validate_name<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
		submit_url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://www.mysite.com/send_mail.php'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Setting Text Options</h3>
<p>A number of text options can be set or changed. The following are the options with their default values:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code76'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73076"><td class="code" id="p730code76"><pre class="javascript" style="font-family:monospace;">header_caption<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Please Send Us an Email'</span>
<span style="color: #006600; font-style: italic;">// The top_text is the area above the form field. Use this area to display any additional information or instructions</span>
top_text<span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span>
<span style="color: #006600; font-style: italic;">// The feedback tab</span>
feedback_button_text<span style="color: #339933;">:</span> <span style="color: #3366CC;">'FeedBack'</span></pre></td></tr></table></div>

<p>In addition, the <strong>subject</strong> field can be pre-filled. You can also set whether you want the subject field to be disabled.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code77'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73077"><td class="code" id="p730code77"><pre class="javascript" style="font-family:monospace;">feedback_subject<span style="color: #339933;">:</span> <span style="color: #3366CC;">'I love Stargate SG-1'</span>
<span style="color: #006600; font-style: italic;">// The disable_subject option is empty by default</span>
<span style="color: #006600; font-style: italic;">// To disable the field, set the option to true</span>
disable_subject<span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span></pre></td></tr></table></div>

<h3>Displaying the FeedBack Form in a Dialog box</h3>
<p>By default, when a user clicks on the feedback tab, the feedback form will slide into view. If you prefer to display a dialog box, set the <strong>show</strong> option to <strong>dialog</strong> (it is set to <strong>slide</strong> by default). You also have to give the dialog an id and set the width.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code78'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73078"><td class="code" id="p730code78"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imFeedBack</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		show<span style="color: #339933;">:</span> <span style="color: #3366CC;">'dialog'</span><span style="color: #339933;">,</span>
		dialog_container<span style="color: #339933;">:</span> <span style="color: #3366CC;">'imFeedBack-dialog'</span><span style="color: #339933;">,</span>
		dialog_width<span style="color: #339933;">:</span> <span style="color: #3366CC;">'550px'</span><span style="color: #339933;">,</span>
		submit_url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://www.mysite.com/send_mail.php'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This <strong>dialog_container</strong> does not have to be styled, if you have not set the body&#8217;s font-size to 62.5%, you may want to set it here.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code79'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73079"><td class="code" id="p730code79"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#imFeedBack-dialog</span> <span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">62.5%</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>When using the dialog option, you also have the option of displaying your own form. Just set the <strong>dialog_widget_form</strong> option to false and then create your own form.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code80'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73080"><td class="code" id="p730code80"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imFeedBack</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		show<span style="color: #339933;">:</span> <span style="color: #3366CC;">'dialog'</span><span style="color: #339933;">,</span>
		dialog_container<span style="color: #339933;">:</span> <span style="color: #3366CC;">'my-dialog'</span><span style="color: #339933;">,</span>
                dialog_widget_form<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> 
		dialog_width<span style="color: #339933;">:</span> <span style="color: #3366CC;">'550px'</span><span style="color: #339933;">,</span>
		submit_url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://www.mysite.com/send_mail.php'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>When using this option, make sure you name your form <strong>imFeedBack-FormContainer</strong>, so that it will be submitted correctly.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code81'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73081"><td class="code" id="p730code81"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;my-dialog&quot;&gt;
&lt;form name=&quot;imFeedBack-FormContainer&quot; id=&quot;imFeedBack-FormContainer&quot;&gt;
&nbsp;
&lt;/form&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<h3>External Control</h3>
<p>I set up the ui.imFeedBack widget so that it can be opened by a separate element on the page. Use this option if you want to display a specific <strong>feedback_subject</strong> and <strong>top_text</strong> options that are different from your site-wide feedback form. I created the <a href="http://web20.digitalvilliage.com" target="_blank">web20.digitalvilliage.com</a> site for marketing purposes. At the top of the page, I created a button with the text: Need A Web Developer?. When the user clicks on the button, the feedback form appears with the subject field pre-filled.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code82'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73082"><td class="code" id="p730code82"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imFeedBack</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		top_text<span style="color: #339933;">:</span> <span style="color: #3366CC;">'For expert web design, contact us today'</span><span style="color: #339933;">,</span>
		feedback_subject<span style="color: #339933;">:</span> <span style="color: #3366CC;">'I need a web designer'</span><span style="color: #339933;">,</span>
		external_control<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> id<span style="color: #339933;">:</span> <span style="color: #3366CC;">'stargateBtn'</span><span style="color: #339933;">,</span> top_text<span style="color: #339933;">:</span> <span style="color: #3366CC;">'If you love Stargate SG-1, send us an email to tell us why.'</span><span style="color: #339933;">,</span> feedback_subject<span style="color: #339933;">:</span> <span style="color: #3366CC;">'I love Stargate-SG1'</span><span style="color: #339933;">,</span> disable_subject<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		submit_url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://www.mysite.com/send_mail.php'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The <strong>external_control</strong> option has 4 values that can be set:</p>
<p><strong>id:</strong> The id of the controlling element (Mandatory)<br />
<strong>top_text:</strong> The text to be displayed above the form fields (optional)<br />
<strong>feedback_subject:</strong> The text to be displayed in the subject field (optional)<br />
<strong>disable_subject:</strong> Whether to disable the subject field (optional)</p>
<p>Once the feedback form is closed, the relevant values will be set back to the global options.</p>
<h3>Submitting the Form</h3>
<p>The feedback form will submit the following fields:</p>
<ul>
<li>imFeedBack-Email</li>
<li>imFeedBack-Subject</li>
<li>imFeedBack-Message</li>
</ul>
<p>When using the <strong>form_capture_name</strong> option, the form will also submit:</p>
<ul>
<li>imFeedBack-FirstName (when option = <strong>firstName</strong>)</li>
<li>imFeedBack-Name (when option = <strong>fullName</strong>)</li>
<li>imFeedBack-FirstName, imFeedBack-LastName (when option = <strong>firstLast</strong>)</li>
</ul>
<p>In addition to these values, you can send hidden fields, using the <strong>hidden_fields</strong> option:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code83'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73083"><td class="code" id="p730code83"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imFeedBack</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		hidden_fields<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span> <span style="color: #009900;">&#123;</span><span style="color: #000066;">name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;message_type&quot;</span><span style="color: #339933;">,</span> value<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;P&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span><span style="color: #000066;">name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;action&quot;</span><span style="color: #339933;">,</span> value<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;doWhatever&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
		submit_url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://www.mysite.com/send_mail.php'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The form is submitted ajaxally. The widget expects a <a href="http://www.json.org" target="_blank">Json</a> record to be returned.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code84'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73084"><td class="code" id="p730code84"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;response&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Message Sent&quot;</span><span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>If &#8220;Message Sent&#8221; is the response, then the widget will display:</p>
<p>Thank you for contacting us. We will get back to you as soon as we can.</p>
<p>If &#8220;Message Sent&#8221; is not in the response, the widget will display the message sent back.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code85'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73085"><td class="code" id="p730code85"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$success</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'{&quot;response&quot;: &quot;Message Sent&quot;}'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'{&quot;response&quot;: &quot;'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$errorMsg</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;}'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The success message can be changed by setting the <strong>success_msg</strong> option:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p730code86'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p73086"><td class="code" id="p730code86"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">imFeedBack</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		success_msg<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Thank you contacting us'</span><span style="color: #339933;">,</span>
		submit_url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://www.mysite.com/send_mail.php'</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Well that&#8217;s it. As you can see the ui.imFeedBack widget is extremely versatile, but simple to use. You can download the widget from <a href="https://github.com/lesgreen/imFeedBack" target="_blank">GitHub</a>. You can view demos of the widget in the <a href="http://grasshopperpebbles.com/demos/index.php/welcome/jqueryui" target="_blank">JQuery UI Widgets demo</a> section of my site. Enjoy.</p>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
</div> <!-- KonaBody -->
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrasshopperpebbles.com%2Fajax%2Fui-imfeedback-a-jquery-ui-feedback-widget%2F&amp;title=ui.imFeedBack%20%26%238211%3B%20A%20JQuery%20UI%20Feedback%20Widget" id="wpa2a_10"><img src="http://grasshopperpebbles.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=fT9PZmaIOZY:2PuWV1kMYnM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=fT9PZmaIOZY:2PuWV1kMYnM:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=fT9PZmaIOZY:2PuWV1kMYnM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=fT9PZmaIOZY:2PuWV1kMYnM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=fT9PZmaIOZY:2PuWV1kMYnM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=fT9PZmaIOZY:2PuWV1kMYnM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=fT9PZmaIOZY:2PuWV1kMYnM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=fT9PZmaIOZY:2PuWV1kMYnM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=fT9PZmaIOZY:2PuWV1kMYnM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=fT9PZmaIOZY:2PuWV1kMYnM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=fT9PZmaIOZY:2PuWV1kMYnM:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=fT9PZmaIOZY:2PuWV1kMYnM:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=fT9PZmaIOZY:2PuWV1kMYnM:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=fT9PZmaIOZY:2PuWV1kMYnM:KwTdNBX3Jqk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Grasshopperpebblescom/~4/fT9PZmaIOZY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://grasshopperpebbles.com/ajax/ui-imfeedback-a-jquery-ui-feedback-widget/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://grasshopperpebbles.com/ajax/ui-imfeedback-a-jquery-ui-feedback-widget/</feedburner:origLink></item>
		<item>
		<title>Loading Multiple Images using the gpUrlLoader Class</title>
		<link>http://feedproxy.google.com/~r/Grasshopperpebblescom/~3/SAnj3Ti8Qaw/</link>
		<comments>http://grasshopperpebbles.com/flash/loading-multiple-images-using-the-gpurlloader-class/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 18:27:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[gpAS3Library]]></category>
		<category><![CDATA[gpFlashGallery]]></category>
		<category><![CDATA[gpUrlLoader]]></category>
		<category><![CDATA[XMLList]]></category>

		<guid isPermaLink="false">http://grasshopperpebbles.com/?p=705</guid>
		<description><![CDATA[I discussed the use of the gpUrlLoader Class in a previous post (see: AS3: A URLLoader Class). This class, part of my gpAS3Library, will load image, swf, text, xml, html, stylesheet, json, and sound files. In this post, I will discuss how to use the gpUrlLoader class to load multiple images into a Flash movie. [...]]]></description>
			<content:encoded><![CDATA[
<div class="KonaBody">
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fflash%2Floading-multiple-images-using-the-gpurlloader-class%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fflash%2Floading-multiple-images-using-the-gpurlloader-class%2F&amp;source=lesgreen&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I discussed the use of the <strong>gpUrlLoader</strong> Class in a previous post (see: <a href="http://grasshopperpebbles.com/flash/as3-a-urlloader-class/" target="_blank">AS3: A URLLoader Class</a>). This class, part of my <a href="http://github.com/lesgreen/gpAS3Library" target="_blank">gpAS3Library</a>, will load image, swf, text, xml, html, stylesheet, json, and sound files. </p>
<p>In this post, I will discuss how to use the gpUrlLoader class to load multiple images into a Flash movie. I used this technique when I created the <a href="http://galleries.digitalvilliage.com" target="_blank">gpFlashGallery</a> (A free Flash/XML photo gallery).</p>
<p><span id="more-705"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p705code92'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p70592"><td class="code" id="p705code92"><pre class="actionscript" style="font-family:monospace;">package <span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Loader</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">grasshopper</span>.<span style="color: #006600;">utils</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> gpGallery <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span>
                <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> images_xml:XMLList;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> images_ar:<span style="color: #0066CC;">Array</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> cnt:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
                <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> total_images:<span style="color: #0066CC;">int</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> gpGallery<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span>images:<span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
                        images_xml = images;
                        total_images = images_xml.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			loadImage<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loadImage<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>  <span style="color: #66cc66;">&#123;</span>
			images_ar<span style="color: #66cc66;">&#91;</span>cnt<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> gpUrlLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			images_ar<span style="color: #66cc66;">&#91;</span>cnt<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, imageLoaded<span style="color: #66cc66;">&#41;</span>;
			images_ar<span style="color: #66cc66;">&#91;</span>cnt<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span>images_xml<span style="color: #66cc66;">&#91;</span>cnt<span style="color: #66cc66;">&#93;</span>.<span style="color: #66cc66;">@</span>thumb, <span style="color: #ff0000;">'image'</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
                <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> imageLoaded<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> ldr:Loader = images_ar<span style="color: #66cc66;">&#91;</span>cnt<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">getImage</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                        addChild<span style="color: #66cc66;">&#40;</span>ldr<span style="color: #66cc66;">&#41;</span>;
                        <span style="color: #808080; font-style: italic;">// ldr.x = </span>
                        <span style="color: #808080; font-style: italic;">// ldr.y =</span>
			cnt++;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>cnt <span style="color: #66cc66;">&lt;</span> total_images<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				loadImage<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span> 
		<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>I store each instance of the <strong>gpUrlLoader</strong> in an array.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p705code93'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p70593"><td class="code" id="p705code93"><pre class="actionscript" style="font-family:monospace;">images_ar<span style="color: #66cc66;">&#91;</span>cnt<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> gpUrlLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>I initialize the <strong>gpUrlLoader</strong> class using a thumb attribute from an images XMLList.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p705code94'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p70594"><td class="code" id="p705code94"><pre class="actionscript" style="font-family:monospace;">images_ar<span style="color: #66cc66;">&#91;</span>cnt<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span>images_xml<span style="color: #66cc66;">&#91;</span>cnt<span style="color: #66cc66;">&#93;</span>.<span style="color: #66cc66;">@</span>thumb, <span style="color: #ff0000;">'image'</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Once the image is loaded, I call the getImage method of the <strong>gpUrlLoader</strong> class.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p705code95'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p70595"><td class="code" id="p705code95"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> ldr:Loader = images_ar<span style="color: #66cc66;">&#91;</span>cnt<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">getImage</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>If the count (cnt) is less than the total number of images, call the loadImage method.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p705code96'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p70596"><td class="code" id="p705code96"><pre class="actionscript" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>cnt <span style="color: #66cc66;">&lt;</span> total_images<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	loadImage<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>That&#8217;s it. Loading multiple images into a flash movie has never been so easy.</p>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
</div> <!-- KonaBody -->
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrasshopperpebbles.com%2Fflash%2Floading-multiple-images-using-the-gpurlloader-class%2F&amp;title=Loading%20Multiple%20Images%20using%20the%20gpUrlLoader%20Class" id="wpa2a_12"><img src="http://grasshopperpebbles.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=SAnj3Ti8Qaw:rhzWHJjT_po:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=SAnj3Ti8Qaw:rhzWHJjT_po:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=SAnj3Ti8Qaw:rhzWHJjT_po:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=SAnj3Ti8Qaw:rhzWHJjT_po:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=SAnj3Ti8Qaw:rhzWHJjT_po:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=SAnj3Ti8Qaw:rhzWHJjT_po:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=SAnj3Ti8Qaw:rhzWHJjT_po:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=SAnj3Ti8Qaw:rhzWHJjT_po:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=SAnj3Ti8Qaw:rhzWHJjT_po:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=SAnj3Ti8Qaw:rhzWHJjT_po:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=SAnj3Ti8Qaw:rhzWHJjT_po:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=SAnj3Ti8Qaw:rhzWHJjT_po:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=SAnj3Ti8Qaw:rhzWHJjT_po:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=SAnj3Ti8Qaw:rhzWHJjT_po:KwTdNBX3Jqk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Grasshopperpebblescom/~4/SAnj3Ti8Qaw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://grasshopperpebbles.com/flash/loading-multiple-images-using-the-gpurlloader-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://grasshopperpebbles.com/flash/loading-multiple-images-using-the-gpurlloader-class/</feedburner:origLink></item>
		<item>
		<title>gpFlashGallery – A Free Flash Photo Gallery</title>
		<link>http://feedproxy.google.com/~r/Grasshopperpebblescom/~3/Wc8WcJi-fBc/</link>
		<comments>http://grasshopperpebbles.com/flash/gpflashgallery-a-free-flash-photo-gallery/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 18:21:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cool Sites]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[galleries.digitalvillage.com]]></category>
		<category><![CDATA[gpFlashGallery]]></category>
		<category><![CDATA[photogallery]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://grasshopperpebbles.com/?p=726</guid>
		<description><![CDATA[In a previous post, I discussed the web 2.0 domain name generator and the web 2.0. color harmonizer that I created on web20.digitalvilliage.com. On the galleries.digitalvilliage.com subdomain, I created the gpFlashGallery, a free XML-based Flash Photo Gallery. The gpFlashGallery is highly configurable via an XML file. Every aspect of the gpFlashGallery can be configured using [...]]]></description>
			<content:encoded><![CDATA[
<div class="KonaBody">
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fflash%2Fgpflashgallery-a-free-flash-photo-gallery%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fflash%2Fgpflashgallery-a-free-flash-photo-gallery%2F&amp;source=lesgreen&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In a previous post, I discussed the <a href="http://grasshopperpebbles.com/cool-sites/web-2-0-domain-name-generator/" target="_blank">web 2.0 domain name generator</a> and the <a href="http://grasshopperpebbles.com/cool-sites/web-2-0-color-harmonizer/" target="_blank">web 2.0. color harmonizer</a> that I created on <a href="http://web20.digitalvilliage.com" target="_blank">web20.digitalvilliage.com</a>. On the <a href="http://galleries.digitalvilliage.com" target="_blank">galleries.digitalvilliage.com</a> subdomain, I created the gpFlashGallery, a free XML-based Flash Photo Gallery.</p>
<p>The gpFlashGallery is highly configurable via an XML file. Every aspect of the gpFlashGallery can be configured using this XML file (page color, thumb container dimensions and color, transition type, etc). The image information (location and optional title) is also stored in an XML file.</p>
<h3>gpFlashGallery Features</h3>
<ul>
<li>Easily change background color</li>
<li>Display images with varying dimensions</li>
<li>Image preloader</li>
<li>Animation effects can be applied to large image (transition in and out)</li>
<li>Thumb container can be positioned on the bottom or top of the page</li>
<li>Optional title can be displayed for each image</li>
<li>Free</li>
</ul>
<p>More information about the gpFlashGallery can be found on <a href="http://galleries.digitalvilliage.com" target="_blank">http://galleries.digitalvilliage.com</a>. The files can be downloaded from <a href="http://github.com/lesgreen/gpFlashGallery" target="_blank">GitHub</a>.</p>
<p>BTW, the reason I named the subdomain <strong>galleries</strong> rather than <strong>gpflashgallery</strong> is because I plan to add to add other photo galleries there in the future. I created both a Dojo and JQuery photo gallery almost a year ago for projects that I was working on. Once I get change to document the plugins/widgets, I will place them on the galleries subdomain.</p>
<p>Let me know what you think.</p>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
</div> <!-- KonaBody -->
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrasshopperpebbles.com%2Fflash%2Fgpflashgallery-a-free-flash-photo-gallery%2F&amp;title=gpFlashGallery%20%26%238211%3B%20A%20Free%20Flash%20Photo%20Gallery" id="wpa2a_14"><img src="http://grasshopperpebbles.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=Wc8WcJi-fBc:cXmVmuTUhNQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=Wc8WcJi-fBc:cXmVmuTUhNQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=Wc8WcJi-fBc:cXmVmuTUhNQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=Wc8WcJi-fBc:cXmVmuTUhNQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=Wc8WcJi-fBc:cXmVmuTUhNQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=Wc8WcJi-fBc:cXmVmuTUhNQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=Wc8WcJi-fBc:cXmVmuTUhNQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=Wc8WcJi-fBc:cXmVmuTUhNQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=Wc8WcJi-fBc:cXmVmuTUhNQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=Wc8WcJi-fBc:cXmVmuTUhNQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=Wc8WcJi-fBc:cXmVmuTUhNQ:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=Wc8WcJi-fBc:cXmVmuTUhNQ:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=Wc8WcJi-fBc:cXmVmuTUhNQ:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=Wc8WcJi-fBc:cXmVmuTUhNQ:KwTdNBX3Jqk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Grasshopperpebblescom/~4/Wc8WcJi-fBc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://grasshopperpebbles.com/flash/gpflashgallery-a-free-flash-photo-gallery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://grasshopperpebbles.com/flash/gpflashgallery-a-free-flash-photo-gallery/</feedburner:origLink></item>
		<item>
		<title>Web 2.0 Color Harmonizer</title>
		<link>http://feedproxy.google.com/~r/Grasshopperpebblescom/~3/4fZeTFqkX30/</link>
		<comments>http://grasshopperpebbles.com/cool-sites/web-2-0-color-harmonizer/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 17:56:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cool Sites]]></category>
		<category><![CDATA[color harmonizer]]></category>
		<category><![CDATA[color schemes]]></category>
		<category><![CDATA[color wheel]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[web20.digitalvilliage.com]]></category>

		<guid isPermaLink="false">http://grasshopperpebbles.com/?p=724</guid>
		<description><![CDATA[In a previous post, I discussed the web 20. domain name generator that I created on web20.digitalvilliage.com. The other tool that I created for this subdomain was a web 2.0 color harmonizer. The web 2.0 color harmonizer tool allows you to select colors from 4 different color palettes: You can select a color from a [...]]]></description>
			<content:encoded><![CDATA[
<div class="KonaBody">
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fcool-sites%2Fweb-2-0-color-harmonizer%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fcool-sites%2Fweb-2-0-color-harmonizer%2F&amp;source=lesgreen&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In a previous <a href="http://grasshopperpebbles.com/cool-sites/web-2-0-domain-name-generator/" target="_blank">post</a>, I discussed the web 20. domain name generator that I created on <a href="http://web20.digitalvilliage.com" target="_blank">web20.digitalvilliage.com</a>. The other tool that I created for this subdomain was a <a href="http://web20.digitalvilliage.com/web20color" target="_blank">web 2.0 color harmonizer</a>. </p>
<p>The web 2.0 color harmonizer tool allows you to select colors from 4 different color palettes:</p>
<ol>
<li>You can select a color from a web 2.0 color palette</li>
<li>You can select a color from a web216 color palette</li>
<li>You can select colors from an image by entering the url of the image</li>
<li>You can select colors from a random <a href="http://www.flickr.com" target="_blank">Flickr</a> image</li>
</ol>
<p>The color harmonies displayed include <a href="http://en.wikipedia.org/wiki/Color_scheme" target="_blank">color schemes</a> from a color wheel: Complementary, Split-Complementary, Analogous, Triad, and Tetrad (or quadrads). A 5% Saturation gradient, a 5% Luminance Gradient, and a 5% combined Saturation/Luminance gradient will also be displayed for the selected color.</p>
<p>I created a <a href="http://book.cakephp.org/view/62/Components" target="_blank">CakePHP Component</a> to calculate the color harmonies and created a <a href="http://jquery.com" target="_blank">JQuery</a> Plugin to display the results. Let me know what you think. </p>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
</div> <!-- KonaBody -->
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrasshopperpebbles.com%2Fcool-sites%2Fweb-2-0-color-harmonizer%2F&amp;title=Web%202.0%20Color%20Harmonizer" id="wpa2a_16"><img src="http://grasshopperpebbles.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=4fZeTFqkX30:IxkMc8QJQ14:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=4fZeTFqkX30:IxkMc8QJQ14:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=4fZeTFqkX30:IxkMc8QJQ14:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=4fZeTFqkX30:IxkMc8QJQ14:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=4fZeTFqkX30:IxkMc8QJQ14:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=4fZeTFqkX30:IxkMc8QJQ14:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=4fZeTFqkX30:IxkMc8QJQ14:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=4fZeTFqkX30:IxkMc8QJQ14:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=4fZeTFqkX30:IxkMc8QJQ14:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=4fZeTFqkX30:IxkMc8QJQ14:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=4fZeTFqkX30:IxkMc8QJQ14:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=4fZeTFqkX30:IxkMc8QJQ14:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=4fZeTFqkX30:IxkMc8QJQ14:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=4fZeTFqkX30:IxkMc8QJQ14:KwTdNBX3Jqk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Grasshopperpebblescom/~4/4fZeTFqkX30" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://grasshopperpebbles.com/cool-sites/web-2-0-color-harmonizer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://grasshopperpebbles.com/cool-sites/web-2-0-color-harmonizer/</feedburner:origLink></item>
		<item>
		<title>Web 2.0 Domain Name Generator</title>
		<link>http://feedproxy.google.com/~r/Grasshopperpebblescom/~3/a4ykxLGjn6o/</link>
		<comments>http://grasshopperpebbles.com/cool-sites/web-2-0-domain-name-generator/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 17:19:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cool Sites]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Alexa Rank]]></category>
		<category><![CDATA[backlinks]]></category>
		<category><![CDATA[Bing]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[domain name generator]]></category>
		<category><![CDATA[domain search]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Page Rank]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[web 2.0]]></category>
		<category><![CDATA[web20.digitalvilliage.com]]></category>
		<category><![CDATA[whois]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://grasshopperpebbles.com/?p=720</guid>
		<description><![CDATA[I purchased the domain name digitalvilliage.com quite a few years ago. I wasn&#8217;t sure what I was going to do with it when I first purchased the name (but I knew that it was a great domain name). Although I still haven&#8217;t decided what the focus of the site should be, I decided, for now, [...]]]></description>
			<content:encoded><![CDATA[
<div class="KonaBody">
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fcool-sites%2Fweb-2-0-domain-name-generator%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fcool-sites%2Fweb-2-0-domain-name-generator%2F&amp;source=lesgreen&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I purchased the domain name digitalvilliage.com quite a few years ago. I wasn&#8217;t sure what I was going to do with it when I first purchased the name (but I knew that it was a great domain name). Although I still haven&#8217;t decided what the focus of the site should be, I decided, for now, to create a web 2.0 domain name generator on the site. I developed the site using <a href="http://cakephp.org/" target="_blank">CakePHP</a> and <a href="http://jquery.com/" target="_blank">jQuery</a>. I created a JQuery plugin to provide the domain names <a href="http://en.wikipedia.org/wiki/Ajaxally" target="_blank">ajaxally</a> (a term that I added to wikipedia &#8211; and yes, I already purchased the domain name) .</p>
<p>The site divided into two subdomains (<a href="http://web20.digitalvilliage.com/" target="_blank">web20.digitalvilliage.com</a> and <a href="http://galleries.digitalvilliage.com/" target="_blank">galleries.digitalvilliage.com</a>). I&#8217;ll discuss the <strong>galleries</strong> subdomain in a later post.</p>
<p>I&#8217;ve seen other web 2.0 domain name generators, but my site offers more than just web 2.0 domain name generation. The site contains two main buttons (web 2.0 and suggest)</p>
<p>Click the <strong>web 2.0</strong> button and a domain name will be dynamically generated.</p>
<p>I you click the <strong>suggest</strong> button, a dialog box will be displayed with a name input field and a category dropdown. The categories are: automotive, art, books, business, clothing, computers/internet, entertainment, health/fitness, money/finance, music, politics, popular, romance, travel, and urban dictionary.</p>
<p>After entering a name and selecting a category, a list of domain names will be displayed. You can then click on the name and click the search button to find whether the name is available. If you click on a name from the &#8216;urban dictionary&#8217; category, a popup will be displayed with the definition from <a href="http://www.urbandictionary.com" target="_blank">urbandictionary.com</a>. I&#8217;ve only added 40-50 names from urbandictionary.com &#8211; I plan to add more later.</p>
<p>After entering a name from the <strong>suggest</strong> or clicking the <strong>web 2.0</strong> button, you can then search for the availability of the name.</p>
<p>If a domain name exists, the Google <a href="http://en.wikipedia.org/wiki/PageRank" target="_blank">Page Rank</a>, <a href="http://www.alexa.com" target="_blank">Alexa Rank</a>, <a href="http://www.mattcutts.com/blog/google-provides-backlink-tool-for-site-owners/" target="_blank">Google</a>, <a href="https://siteexplorer.search.yahoo.com/" target="_blank">Yahoo</a>, and <a href="http://www.bing.com/" target="_blank">Bing</a> <a href="http://en.wikipedia.org/wiki/Backlink" target="_blank">BackLinks</a> counts will be displayed. You will also be provided a link to the <strong>whois</strong> database for that name as well a link to Alexa Stats.</p>
<p>If the domain name does not exist, you will be provided a link to a number of domain name registrars.</p>
<p>I worked on this site on-and-off for about 6 months (whenever I had the time). I think that it&#8217;s pretty cool. The site provides an Ajax web 2.0 domain search generator and an Ajax domain search tool. Let me know what you think.</p>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
</div> <!-- KonaBody -->
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrasshopperpebbles.com%2Fcool-sites%2Fweb-2-0-domain-name-generator%2F&amp;title=Web%202.0%20Domain%20Name%20Generator" id="wpa2a_18"><img src="http://grasshopperpebbles.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=a4ykxLGjn6o:kd1V9OX524g:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=a4ykxLGjn6o:kd1V9OX524g:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=a4ykxLGjn6o:kd1V9OX524g:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=a4ykxLGjn6o:kd1V9OX524g:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=a4ykxLGjn6o:kd1V9OX524g:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=a4ykxLGjn6o:kd1V9OX524g:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=a4ykxLGjn6o:kd1V9OX524g:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=a4ykxLGjn6o:kd1V9OX524g:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=a4ykxLGjn6o:kd1V9OX524g:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=a4ykxLGjn6o:kd1V9OX524g:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=a4ykxLGjn6o:kd1V9OX524g:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=a4ykxLGjn6o:kd1V9OX524g:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=a4ykxLGjn6o:kd1V9OX524g:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=a4ykxLGjn6o:kd1V9OX524g:KwTdNBX3Jqk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Grasshopperpebblescom/~4/a4ykxLGjn6o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://grasshopperpebbles.com/cool-sites/web-2-0-domain-name-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://grasshopperpebbles.com/cool-sites/web-2-0-domain-name-generator/</feedburner:origLink></item>
		<item>
		<title>GreenScorpion.com – My Portfolio Site</title>
		<link>http://feedproxy.google.com/~r/Grasshopperpebblescom/~3/6QdoDK8ENGc/</link>
		<comments>http://grasshopperpebbles.com/flash/greenscorpion-com-my-portfolio-site/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 05:49:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[gpAS3Library]]></category>
		<category><![CDATA[GreenScorpion.com]]></category>
		<category><![CDATA[grunge design]]></category>
		<category><![CDATA[portfolio]]></category>

		<guid isPermaLink="false">http://grasshopperpebbles.com/?p=717</guid>
		<description><![CDATA[I finally completed the redesign/development of my portfolio site (GreenScorpion.com). This site was my first attempt at grunge design. I used Photoshop brushes that I downloaded from GetBrushes.com to design the site (and followed some tutorials that I found on SixRevisions.com and DesignHard.com). I developed GreenScorpion.com using Flash/ActionScript 3 and Joomla (and a bit of [...]]]></description>
			<content:encoded><![CDATA[
<div class="KonaBody">
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fflash%2Fgreenscorpion-com-my-portfolio-site%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgrasshopperpebbles.com%2Fflash%2Fgreenscorpion-com-my-portfolio-site%2F&amp;source=lesgreen&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I finally completed the redesign/development of my portfolio site (<a href="http://www.greenscorpion.com" target="_blank">GreenScorpion.com</a>). </p>
<p>This site was my first attempt at grunge design. I used Photoshop brushes that I downloaded from <a href="http://getbrushes.com/grunge-photoshop-brushes/in-obscuro-graffity-brushes.php" target="_blank">GetBrushes.com</a> to design the site (and followed some tutorials that I found on <a href="http://sixrevisions.com/tutorials/photoshop-tutorials/how-to-create-a-grunge-web-design-using-photoshop/" target="_blank">SixRevisions.com</a> and <a href="http://www.designshard.com/inspiration/ultimate-resources-for-grunge-design-a-massive-collection/" target="_blank">DesignHard.com</a>).</p>
<p>I developed GreenScorpion.com using <a href="http://www.adobe.com/products/flash/" target="_blank">Flash/ActionScript 3</a> and <a href="www.joomla.org/" target="_blank">Joomla</a> (and a bit of <a href="http://jquery.com/" target="_blank">JQuery</a>).</p>
<p>For the portfolio display, I created a Flash Movie relied heavily upon the <a href="http://github.com/lesgreen/gpAS3Library" target="_blank">gpAS3Library</a> and XML. I then used Joomla to create a component that incorporated the Flash movie. After the Joomla component was completed, I created a Joomla module based upon the component so that the Flash movie could be displayed in a specific area on a page (on the home page).</p>
<p>I need to add more to the site, but the portfolio part is done. I also need do something to create a more consistent color feel between operating systems. I created the design on my Mac, but I did most of the development on Ubuntu. The website is much darker on Ubuntu than on my Mac (I haven&#8217;t looked at it on Windows, but I&#8217;m sure that there will be a difference as well). But for now, I&#8217;m done.</p>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
</div> <!-- KonaBody -->
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fgrasshopperpebbles.com%2Fflash%2Fgreenscorpion-com-my-portfolio-site%2F&amp;title=GreenScorpion.com%20%26%238211%3B%20My%20Portfolio%20Site" id="wpa2a_20"><img src="http://grasshopperpebbles.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=6QdoDK8ENGc:UE9ZWNZ6e1w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=6QdoDK8ENGc:UE9ZWNZ6e1w:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=6QdoDK8ENGc:UE9ZWNZ6e1w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=6QdoDK8ENGc:UE9ZWNZ6e1w:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=6QdoDK8ENGc:UE9ZWNZ6e1w:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=6QdoDK8ENGc:UE9ZWNZ6e1w:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=6QdoDK8ENGc:UE9ZWNZ6e1w:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=6QdoDK8ENGc:UE9ZWNZ6e1w:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=6QdoDK8ENGc:UE9ZWNZ6e1w:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=6QdoDK8ENGc:UE9ZWNZ6e1w:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=6QdoDK8ENGc:UE9ZWNZ6e1w:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=6QdoDK8ENGc:UE9ZWNZ6e1w:l6gmwiTKsz0"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?d=l6gmwiTKsz0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?a=6QdoDK8ENGc:UE9ZWNZ6e1w:KwTdNBX3Jqk"><img src="http://feeds.feedburner.com/~ff/Grasshopperpebblescom?i=6QdoDK8ENGc:UE9ZWNZ6e1w:KwTdNBX3Jqk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Grasshopperpebblescom/~4/6QdoDK8ENGc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://grasshopperpebbles.com/flash/greenscorpion-com-my-portfolio-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://grasshopperpebbles.com/flash/greenscorpion-com-my-portfolio-site/</feedburner:origLink></item>
	</channel>
</rss>

