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

<channel>
	<title>Web Development Blog &#187; AJAX</title>
	<atom:link href="http://www.scriptiny.com/tag/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptiny.com</link>
	<description>This web development blog features fresh articles on JavaScript, AJAX, CSS, XHTML, PHP, Photoshop and more.</description>
	<lastBuildDate>Fri, 10 Feb 2012 19:53:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Simple AJAX Function with Example</title>
		<link>http://www.scriptiny.com/2011/01/simple-ajax-function-example/</link>
		<comments>http://www.scriptiny.com/2011/01/simple-ajax-function-example/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 03:15:09 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[AJAX]]></category>

		<guid isPermaLink="false">http://www.scriptiny.com/?p=362</guid>
		<description><![CDATA[TinyAjax is a simple AJAX function that makes it easy to call and process GET and POST transactions. Check out the example.]]></description>
			<content:encoded><![CDATA[<p>Below is the simple AJAX function that I use in many of my projects, TinyAjax. It makes it easy to call and process GET and POST transactions. Here are the parameters:</p>
<ol>
<li>URL (required)</li>
<li>ID of the output element (pass a zero/false for no response output)</li>
<li>String of function to be evaluated and called on completion (optional)</li>
<li>Post content &#8211; example: id=22&amp;action=1 (optional)</li>
</ol>
<p>I will be posting more small snippets soon as well as some updates to previous scripts, new code, and tutorials. Last year was roller coaster with getting my business off the ground and it shows in my lack of time for this site. That being said, I plan to take more time to give back  this year and grow my own skills so expect to see much more of me on here. I cleaned up the forums and implemented DISQUS to help everyone get the most out of this site.</p>
<p>On a side note, I have formed a new company this year with a partner and  we are opening an office in historic downtown Franklin, TN. We will be  looking for some good people to work with us so if you or anyone you  know is in the Nashville area, please have them drop me a line.</p>
<pre class="brush: jscript; title: ; notranslate">TINY={};

function T$(id){return document.getElementById(id)}

TINY.ajax=function(){
    return{
        call:function(u,d,f,p){
            var x=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');
            x.onreadystatechange=function(){
                if(x.readyState==4&amp;&amp;x.status==200){
                    if(d){
                        var t=T$(d);
                        t.innerHTML=x.responseText
                    }
                    if(f){
                        var c=new Function(f); c()
                    }
                }
            };
            if(p){
                x.open('POST',u,true);
                x.setRequestHeader('Content-type','application/x-www-form-urlencoded');
                x.send(p)
            }else{
                x.open('GET',u,true);
                x.send(null)
            }
        }
    };
}();</pre>
<p>A call would look something like the following:</p>
<pre class="brush: jscript; title: ; notranslate">TINY.ajax.call('get.php?id=32', 'content', 'display(&quot;red&quot;)'); // GET
TINY.ajax.call('post.php', 'content', 'display(&quot;green&quot;)', 'id=32'); // POST</pre>
<h3><strong><a href="http://sandbox.scriptiny.com/tinyajax/">Click here</a></strong> for the demo.</h3>
<h3><strong><a href="http://forum.leigeber.com/index.php?app=downloads&amp;module=display&amp;section=download&amp;do=confirm_download&amp;id=12">Click here</a></strong> to download PHP example.</h3>
<p>Keep in mind that this will not work on your local computer unless you are running a web server like Apache. This script has been tested in all major browsers and is available free  of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/">creative commons  license</a>. Community support is <a href="http://www.scriptiny.com/qa/">available  here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scriptiny.com/2011/01/simple-ajax-function-example/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>TinyBox JavaScript Popup Box &#8211; 3.4KB</title>
		<link>http://www.scriptiny.com/2009/05/javascript-popup-box/</link>
		<comments>http://www.scriptiny.com/2009/05/javascript-popup-box/#comments</comments>
		<pubDate>Sun, 24 May 2009 21:53:19 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[modal]]></category>
		<category><![CDATA[popup]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://www.scriptiny.com/?p=174</guid>
		<description><![CDATA[TinyBox is a lightweight and standalone JavaScript popup box script. At only 3.4KB it allows for any AJAX or HTML input and can also be used for images and auto hiding alerts.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.scriptiny.com/wp-content/uploads/2009/05/tiny-box.gif" alt="JavaScript Modal Window Script" width="459" height="175" /></p>
<h3><a href="http://www.scriptiny.com/2011/03/javascript-modal-windows/"><strong>Click here</strong></a> for the latest version.</h3>
<p>TinyBox is a lightweight and standalone modal window script. At only 3.4KB it doesn&#8217;t include any slideshow capabilities built-in but allows for any AJAX or HTML input so the sky is the limit. Future versions will include additional features. It can also be used for images and auto hiding alerts. The popups fade in/out and dynamically size based on the content if enabled. The styling is completely customizable through the simple CSS. I have a couple tutorials and a few scripts I will be posting very soon so check back.</p>
<p>To display a popup box use the following code:</p>
<pre class="brush: jscript; title: ; notranslate">TINY.box.show('advanced.html',1,300,150,1,3);</pre>
<p>There is nothing to initialize, just start using the script. The TINY.box.show function takes 6 parameters: the HTML content for the box or the relative path to the AJAX source, a toggle (true/false or 1/0) if the content is via AJAX, the width of the window (use 0 for auto), the height of the window (use 0 for auto), a toggle (true/false or 1/0) to animate the window, and the time in seconds to wait before auto hiding the popup (optional).</p>
<p>This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/" target="_blank">creative commons license</a>. Community support is <a href="http://www.scriptiny.com/qa/">available here</a>. Paid support is also available, <a href="http://www.scriptiny.com/contact/">contact me</a> for details.</p>
<p><strong><a href="http://sandbox.scriptiny.com/tinybox/">Click here for the demo.</a></strong></p>
<p><strong><a href="http://forum.leigeber.com/index.php?app=downloads&amp;showfile=4">Click here to download the source code.</a></strong></p>
<p><strong>Update 11/15/2009</strong> – Updated logic to speed up the animation and fix a positioning issue. Slightly dropped the code weight.</p>
<p><strong>Update 11/16/2009</strong> – Fixed issue that occurred when sizing down a box.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scriptiny.com/2009/05/javascript-popup-box/feed/</wfw:commentRss>
		<slash:comments>316</slash:comments>
		</item>
		<item>
		<title>Animated JavaScript Slideshow &#8211; 5KB</title>
		<link>http://www.scriptiny.com/2008/12/javascript-slideshow/</link>
		<comments>http://www.scriptiny.com/2008/12/javascript-slideshow/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 23:34:13 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[show]]></category>
		<category><![CDATA[slide]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://www.scriptiny.com/?p=109</guid>
		<description><![CDATA[This JavaScript slideshow is feature packed and under 5KB. Features include smooth animation, title/description/link support, no naming restrictions, graceful degradation, on-demand image loading and active thumbnail status.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.scriptiny.com/wp-content/uploads/2008/12/javascript-slideshow.jpg" alt="JavaScript Slideshow" width="459" height="200" /></p>
<p>This dynamic JavaScript slideshow is feature packed and under 5KB. It is the long awaited update to my previous script <a href="http://www.scriptiny.com/2008/05/ajax-image-gallery-slideshow/">here</a>. A few new features include description support, link support, no naming restrictions, portrait image support, graceful degradation and active thumbnail status. This script was built ground-up and will soon be included at <a href="http://www.scriptiny.com/">scriptiny </a>where all my scripts will be added as they are updated, debugged and incorporated in the new TINY namespace. I will also document the scripts more thoroughly and publish multiple examples. I will continue to publish scripts there and support as I have time via the new community forum. I will try and post more frequently here on a wide range of web development related topics.</p>
<p>Here is an example of the markup to build a slideshow…</p>
<pre class="brush: xml; title: ; notranslate">
&lt;ul id=&quot;slideshow&quot;&gt;
	&lt;li&gt;
		&lt;h3&gt;Image One&lt;/h3&gt;
		&lt;span&gt;photos/image-one.jpg&lt;/span&gt;
		&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ut urna. Mauris nulla. Donec nec mauris. Proin nulla dolor, bibendum et, dapibus in, euismod ut, felis.&lt;/p&gt;
		&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;thumbnails/image-one.jpg&quot; alt=&quot;Image One&quot; /&gt;&lt;/a&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;h3&gt;Image Two&lt;/h3&gt;
		&lt;span&gt;photos/image-two.jpg&lt;/span&gt;
		&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ut urna. Mauris nulla. Donec nec mauris. Proin nulla dolor, bibendum et, dapibus in, euismod ut, felis.&lt;/p&gt;
		&lt;img src=&quot;thumbnails/image-two.jpg&quot; alt=&quot;Image Two&quot; /&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>Each &#8220;li&#8221; above represents an image. The &#8220;h3&#8243; content becomes the title for the image and the &#8220;p&#8221; the description. The &#8220;span&#8221; content is the path to the fullsize image. If you want to link the image wrap an &#8220;a&#8221; tag around the &#8220;img&#8221; tag which is the thumbnail image.</p>
<p>The following are the parameters that can be set on the object&#8230; more complete documentation will follow soon. Default values are displayed as (10) and recommended values as [1-20].</p>
<p><strong>Images</strong></p>
<p>imgSpeed = int; (10)<br />
navOpacity = int; (25)<br />
navHover = int; (70)<br />
letterbox = &#8220;string&#8221;; (#000) required color for letterbox on portrait images<br />
link = &#8220;string&#8221;; class name for link hover state</p>
<p><strong>Auto Slideshow</strong></p>
<p>auto = boolean; (false)<br />
speed = int; (10)</p>
<p><strong>Information Dialog</strong></p>
<p>info = boolean; (true)<br />
infoID = &#8220;string&#8221;; required for information dialog<br />
infoSpeed = int; (10)</p>
<p><strong>Thumbnail Slider</strong></p>
<p>thumbs = &#8220;string&#8221;; id of thumbnail slider, disabled if not set<br />
scrollSpeed = int; [1-20] (5)<br />
thumbOpacity = int; [0-100] (70)<br />
active = &#8220;string&#8221;; required for thumbnail active border<br />
spacing = int; (5) spacing between thumbnails<br />
left = &#8220;string&#8221;; id of left navigation link, required for slider<br />
right = &#8220;string&#8221;; id of right navigation link, required for slider</p>
<p>Here is an example calling the script&#8230;</p>
<pre class="brush: jscript; title: ; notranslate">var slideshow=new TINY.slideshow(&quot;slideshow&quot;);
window.onload=function(){
slideshow.auto=true;
slideshow.speed=5;
slideshow.link=&quot;linkhover&quot;;
slideshow.info=&quot;information&quot;;
slideshow.thumbs=&quot;slider&quot;;
slideshow.left=&quot;slideleft&quot;;
slideshow.right=&quot;slideright&quot;;
slideshow.scrollSpeed=4;
slideshow.spacing=5;
slideshow.active=&quot;#fff&quot;;
slideshow.init('slideshow','image','imgprev','imgnext','imglink');
}</pre>
<p>The init function takes 5 parameters (id of the slideshow content placeholder, the id of the image placeholder, the id of the previous image placeholder, the id of the next image placeholder, the id of the image link placeholder).</p>
<p>This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/" target="_blank">creative commons license</a>. Community support is <a href="http://www.scriptiny.com/qa/">available here</a>. Paid support is also available, <a href="http://www.scriptiny.com/contact/">contact me</a> for details.</p>
<p><strong><a href="http://sandbox.scriptiny.com/javascript-slideshow/" target="_blank">Click here for the demo.</a></strong></p>
<p><strong><a href="http://forum.leigeber.com/index.php?app=downloads&#038;showfile=6">Click here to download the source.</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.scriptiny.com/2008/12/javascript-slideshow/feed/</wfw:commentRss>
		<slash:comments>255</slash:comments>
		</item>
		<item>
		<title>Dynamic Image Gallery and Slideshow</title>
		<link>http://www.scriptiny.com/2008/05/ajax-image-gallery-slideshow/</link>
		<comments>http://www.scriptiny.com/2008/05/ajax-image-gallery-slideshow/#comments</comments>
		<pubDate>Thu, 15 May 2008 18:11:05 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://www.scriptiny.com/?p=43</guid>
		<description><![CDATA[This lightweight Ajax image gallery and slideshow script clocks in under 3kb packed with a number of cool features.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.scriptiny.com/wp-content/uploads/2008/05/slideshow.jpg" alt="Ajax Image Gallery" width="459" height="250" /></p>
<p><strong>The updated version of the script is <a href="http://www.scriptiny.com/2008/12/javascript-slideshow/">available here</a>.</strong></p>
<p>This extremely lightweight JavaScript image gallery and slideshow script clocks in under 3kb packed and includes a number of cool features. Recently I was looking for a nice existing script for a client project. I wanted something elegant, simple and lightweight. What I found were a number of scripts built on JavaScript frameworks and a few others that really lacked any appealing interface or were over  30kb. I challenged myself to build a full-featured slideshow gallery under 4kb. Hopefully I will be add a few more features to the script soon and make it a little mode user-friendly.</p>
<p>Here is an example of the markup&#8230;</p>
<pre class="brush: xml; title: ; notranslate">&lt;div id=&quot;gallery&quot;&gt;
&lt;div id=&quot;imagearea&quot;&gt;
&lt;div id=&quot;image&quot;&gt;
&lt;a href=&quot;javascript:slideShow.nav(-1)&quot; id=&quot;previmg&quot;&gt;&lt;/a&gt;
&lt;a href=&quot;javascript:slideShow.nav(1)&quot; id=&quot;nextimg&quot;&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;thumbwrapper&quot;&gt;
&lt;div id=&quot;thumbarea&quot;&gt;
&lt;ul id=&quot;thumbs&quot;&gt;
&lt;li value=&quot;1&quot;&gt;&lt;img src=&quot;thumbs/1.jpg&quot; alt=&quot;&quot; /&gt;&lt;/li&gt;
&lt;li value=&quot;2&quot;&gt;&lt;img src=&quot;thumbs/2.jpg&quot; alt=&quot;&quot; /&gt;&lt;/li&gt;
&lt;li value=&quot;3&quot;&gt;&lt;img src=&quot;thumbs/3.jpg&quot; alt=&quot;&quot; /&gt;&lt;/li&gt;
&lt;li value=&quot;4&quot;&gt;&lt;img src=&quot;thumbs/4.jpg&quot; alt=&quot;&quot; /&gt;&lt;/li&gt;
&lt;li value=&quot;5&quot;&gt;&lt;img src=&quot;thumbs/5.jpg&quot; alt=&quot;&quot; /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</pre>
<p>The list section is the important element to the gallery. Each li has a value property that is set to the name of the full-size image. The interface is very flexible and can easily be altered in the HTML and CSS.</p>
<p>You will also need to setup the variables below and include the slideshow JavaScript&#8230;</p>
<pre class="brush: jscript; title: ; notranslate">var imgid = 'image'; // id of image div //
var imgdir = 'fullsize'; // full-size image directory //
var imgext = '.jpg'; // full-size image extension //
var thumbid = 'thumbs'; // id of the thumbnail container //
var auto = true; // automatic rotation toggle //
var autodelay = 5; // seconds before the image rotates //</pre>
<p>This script isn&#8217;t completely polished yet but I wanted to go ahead and get it out there for anyone that can put it to use. It has been tested in all major browsers and is available free of charge for both personal or commercial projects under the <a href="http://creativecommons.org/licenses/by/3.0/us/" target="_blank">creative commons license</a>. Community support is <a href="http://www.scriptiny.com/qa/">available here</a>. Paid support is also available, <a href="http://www.scriptiny.com/contact/">contact me</a> for details.</p>
<p><strong><a href="http://sandbox.scriptiny.com/slideshow/" target="_blank">Click here for the demo.</a></strong></p>
<p><strong><a href="http://www.scriptiny.com/wp-content/uploads/2008/05/slideshow.zip">Click here to download the source.</a></strong></p>
<p><strong>Update 5/16/2008</strong> &#8211; Updated CSS and added outline:none for the next and previous links.<br />
<strong>Update 5/26/2008</strong> &#8211; Updated the CSS to resolve an issue with resizing the window in IE6. Thanks to Jon Stoski for reporting.<br />
<strong>Update 5/28/2008</strong> &#8211; Pushed script inside global namespace. Fixed a couple IE related bugs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scriptiny.com/2008/05/ajax-image-gallery-slideshow/feed/</wfw:commentRss>
		<slash:comments>302</slash:comments>
		</item>
	</channel>
</rss>

