<?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>Ask Owen &#187; AJAX</title>
	<atom:link href="http://askowen.info/category/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://askowen.info</link>
	<description>Your friendly neighbourhood geek</description>
	<lastBuildDate>Wed, 16 May 2012 21:58:08 +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>How do I create an alternative to Javascript?</title>
		<link>http://askowen.info/2009/08/how-do-i-create-an-alternative-to-javascript/</link>
		<comments>http://askowen.info/2009/08/how-do-i-create-an-alternative-to-javascript/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 11:17:13 +0000</pubDate>
		<dc:creator>Owen</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://askowen.info/?p=647</guid>
		<description><![CDATA[I&#8217;m coding this new left navigation menu for a new website site, and I want to be able to have the navigation show if the visitor has Javascript turned off. Unfortunately the menu has sub-menus that don&#8217;t show if the user doesn&#8217;t have Javascript turned on. How do I create an alternative section to accommodate [...]]]></description>
			<content:encoded><![CDATA[<p class="question">I&#8217;m coding this new left navigation menu for a new website site, and I want to be able to have the navigation show if the visitor has Javascript turned off. Unfortunately the menu has sub-menus that don&#8217;t show if the user doesn&#8217;t have Javascript turned on. How do I create an alternative section to accommodate this?</p>
<p><span id="more-647"></span><br />
I got this question from Kelly who was putting together a website using a a funky Javascript menu and ran into an accessibility issue if the user&#8217;s browser doesn&#8217;t run Javascript (or if the user opts to run NoScript or some other blocking plugin)</p>
<p>The answer is really quite simple. Even piece of Javascript on a web page has the option of being following by a NOSCRIPT section that is executed by the browser if Javascript is not enabled. Here&#8217;s an example of how it works:</p>
<p><code><br />
&lt;script type="text/javascript"&gt;<br />
document.write("Hello World! This was written using Javascript")<br />
&lt;/script&gt;<br />
&lt;noscript&gt;Hello World! Your browser does not support JavaScript!&lt;/noscript&gt;<br />
</code></p>
<p>So, the browser will actually execute one of the 2 sections, if you have Javascript enabled, it will perform the &lt;script&gt; section, otherwise it will execute the &lt;noscript&gt; section. But you get some sort of &#8220;Hello World&#8221; message regardless of whether you are using Javascript or not.</p>
<p>Hope this helps!</p>
<div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"><img style="border: medium none ; float: right;" class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=a58b43bf-49a1-4e98-9dd3-019064281b9c"><span class="zem-script pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://askowen.info/2009/08/how-do-i-create-an-alternative-to-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I add a spinner to my AJAX application?</title>
		<link>http://askowen.info/2008/03/how-do-i-add-a-spinner-to-my-ajax-application/</link>
		<comments>http://askowen.info/2008/03/how-do-i-add-a-spinner-to-my-ajax-application/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 17:28:58 +0000</pubDate>
		<dc:creator>Owen</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[spinner]]></category>

		<guid isPermaLink="false">http://askowen.info/?p=85</guid>
		<description><![CDATA[I have an AJAX application using Prototype which pulls data from a server. How can I show one of those spinning AJAX-style circles while data is loading? This was actually a question I had while working on WPAuctions, a plugin that lets you auctions stuff right off your WordPress blog. I had a couple of [...]]]></description>
			<content:encoded><![CDATA[<p class="question">I have an AJAX application using Prototype which pulls data from a server. How can I show one of those spinning AJAX-style circles while data is loading?</p>
<p><span id="more-85"></span><br />
This was actually a question I had while working on <a href="http://redirectingat.com?id=8352X670472&xs=1&url=http%3A%2F%2Fwww.wpauctions.com&sref=rss">WPAuctions</a>, a plugin that lets you auctions stuff right off your WordPress blog. I had a couple of AJAX calls that populate the lightbox with auction and bid data, and I wanted to add some sort of indication to the user that  something was happening in the background.</p>
<p>Finding the answer on the Web was a bit hairy, but the mechanism is really straight-forward. And I do have <a href="http://redirectingat.com?id=8352X670472&xs=1&url=http%3A%2F%2Fdobrzanski.net%2F2007%2F04%2F23%2Fajax-activity-indicator%2F&sref=rss">JarosÅ‚aw DobrzaÅ„ski</a> to thank for the solution. It&#8217;s a 2-step solution that is so simple to implement, it&#8217;s almost painful. Here&#8217;s what you do:</p>
<p>1. Add this code to the header of your website (not forgetting to include prototype.js of course):<br />
<code class="prettyprint"><span class="embsrc"><span class="typ">Ajax</span><span class="pun">.</span><span class="typ">Responders</span><span class="pun">.</span><span class="kwd">register</span><span class="pun">({</span><span class="pln"><br />
onCreate</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">(){</span><span class="pln"> </span><span class="typ">Element</span><span class="pun">.</span><span class="pln">show</span><span class="pun">(</span><span class="str">'spinner'</span><span class="pun">)},</span><span class="pln"><br />
onComplete</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">(){</span><span class="typ">Element</span><span class="pun">.</span><span class="pln">hide</span><span class="pun">(</span><span class="str">'spinner'</span><span class="pun">)}</span><span class="pln"><br />
</span><span class="pun">});</span></span></code></p>
<p>2. Add this tag where you would like the spinner image to appear:<br />
<code class="prettyprint"><span class="tag">&lt;img </span><span class="atn">alt</span><span class="tag">=</span><span class="atv">"spinner"</span><span class="tag"> </span><span class="atn">id</span><span class="tag">=</span><span class="atv">"spinner"</span><span class="tag"> </span><span class="atn">src</span><span class="tag">=</span><span class="atv">"gfx/spinner.gif"</span><span class="tag"> </span><span class="atn">style</span><span class="tag">=</span><span class="embsrc"><span class="pun">"</span><span class="pln">display</span><span class="pun">:</span><span class="pln">none</span><span class="pun">;</span><span class="str">"</span></span><span class="tag"> </span><span class="atn">/</span><span class="tag">&gt;</span></code></p>
<p>And you&#8217;re done! The code in the header registers a responder with the AJAX library that shows and hides the spinner image when an AJAX call is created and completed respectively. You can use the following indicators if you wish:</p>
<blockquote><p>Spinner 1 : <img src="http://www.yup.com/lib/spinners/spinner_mac.gif" alt="Spinner 1" /><br />
Spinner 2 : <img src="http://www.yup.com/lib/spinners/spinner_moz.gif" alt="Spinner 2" /></p></blockquote>
<p>The spinners above are pretty generic, so you can use them whether you&#8217;re creating a site about <a href="http://redirectingat.com?id=8352X670472&xs=1&url=http%3A%2F%2Fwww.only-network.com&sref=rss">web hosting</a>, <a href="http://redirectingat.com?id=8352X670472&xs=1&url=http%3A%2F%2Fwww.wooddashexperts.com%2Fcustomer%2F2007-chevy-tahoe-accessories.html&sref=rss">Chevy Tahoe accessories</a>, <a href="http://redirectingat.com?id=8352X670472&xs=1&url=http%3A%2F%2Fwww.shopaholic.me.uk&sref=rss">shopping</a> or a <a href="http://redirectingat.com?id=8352X670472&xs=1&url=http%3A%2F%2Fwww.searchmann.com&sref=rss">search directory</a>.</p>
<p>Alternatively you can create your a custom spinner <a href="http://redirectingat.com?id=8352X670472&xs=1&url=http%3A%2F%2Fwww.ajaxload.info%2F&sref=rss">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://askowen.info/2008/03/how-do-i-add-a-spinner-to-my-ajax-application/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

