<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Technologies Ignited</title>
	<atom:link href="http://webigniter.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://webigniter.wordpress.com</link>
	<description>Technologies Ignited</description>
	<lastBuildDate>Sun, 29 Jan 2012 18:32:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='webigniter.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/f504f9ff3dd7349911913a1fe09b647f?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Technologies Ignited</title>
		<link>http://webigniter.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://webigniter.wordpress.com/osd.xml" title="Technologies Ignited" />
	<atom:link rel='hub' href='http://webigniter.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Avoid confirm form resubmission</title>
		<link>http://webigniter.wordpress.com/2011/11/28/avoid-confirm-form-resubmission/</link>
		<comments>http://webigniter.wordpress.com/2011/11/28/avoid-confirm-form-resubmission/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 08:24:17 +0000</pubDate>
		<dc:creator>wyand</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[resubmission]]></category>

		<guid isPermaLink="false">http://webigniter.wordpress.com/?p=638</guid>
		<description><![CDATA[Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ Code Mamba!You can read the same article on our new domain by clicking here! If you have a and you want to avoid the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=638&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:20px;background-color:red;padding:10px;">Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ <a style="color:orange;text-decoration:none;" href="http://codemamba.com/">Code Mamba</a>!</span><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:10px;background-color:orange;padding:5px;"><a style="color:white;" href="http://codemamba.com/avoid-confirm-form-resubmission/">You can read the same article on our new domain by clicking here!</a></span><br />
If you have a and you want to avoid the &#8216;confirm form resubmission&#8217; message on refresh you can check theese advices:<br />
If you&#8217;re able to change the POST variables to GET variables, you can use the idea from this script:</p>
<p><pre class="brush: php;">if(isset($_POST['query']))
{
	header
	(
		'Location: ?controller=currentPage&amp;post1='
		.$_POST['post1'].'&amp;post2='.$_POST['post2']
	); // and so on...
	exit;
}</pre></p>
<p>If you can&#8217;t convert your variables, but your view does not depend on the posted data you can use the idea from this script:</p>
<p><pre class="brush: php;">
	processPostData();
	header('Location: ?controller=currentPage');
	exit;
</pre></p>
<p>This will redirect you to &#8216;?controller=currentPage&#8217; after processing the POST data and if you refresh the page you will stay on &#8216;?controller=currentPage&#8217;, but you will not get the &#8216;confirm form resubmission&#8217; message, because you have no post data on the redirected page.<br />
If you can&#8217;t convert your variables and your view depends on the posted data you can try and send only flag variables. You can use the idea from this script:</p>
<p><pre class="brush: php;">
	if(processPostData() == isValid())
	{
		header('Location: ?controller=currentPage&amp;flag=1');
	}
	else
	{
		header('Location: ?controller=currentPage&amp;flag=0');
	}
	exit;
</pre></p>
<p>If none of theese works, just be creative or leave me a message here!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webigniter.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webigniter.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webigniter.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webigniter.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webigniter.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webigniter.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webigniter.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webigniter.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webigniter.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webigniter.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webigniter.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webigniter.wordpress.com/638/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webigniter.wordpress.com/638/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webigniter.wordpress.com/638/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=638&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webigniter.wordpress.com/2011/11/28/avoid-confirm-form-resubmission/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6fdff6cf4a6174b9ab2faa05a0c07362?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wyand</media:title>
		</media:content>
	</item>
		<item>
		<title>Apache won&#8217;t start as a service while using XAMPP (xampplite)</title>
		<link>http://webigniter.wordpress.com/2011/11/23/apache-wont-start-as-a-service-while-using-xampp-xampplite/</link>
		<comments>http://webigniter.wordpress.com/2011/11/23/apache-wont-start-as-a-service-while-using-xampp-xampplite/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 11:16:36 +0000</pubDate>
		<dc:creator>wyand</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[XAMPP]]></category>
		<category><![CDATA[xampplite]]></category>

		<guid isPermaLink="false">http://webigniter.wordpress.com/?p=634</guid>
		<description><![CDATA[Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ Code Mamba!You can read the same article on our new domain by clicking here! If you&#8217;re using xampplite and you Apache service does not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=634&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:20px;background-color:red;padding:10px;">Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ <a style="color:orange;text-decoration:none;" href="http://codemamba.com/">Code Mamba</a>!</span><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:10px;background-color:orange;padding:5px;"><a style="color:white;" href="http://codemamba.com/apache-wont-start-as-a-service-while-using-xampp-xampplite/">You can read the same article on our new domain by clicking here!</a></span><br />
If you&#8217;re using xampplite and you Apache service does not start, you might want to check your error.log.<br />
You can find it in PATH_TO_YOUR_XAMPP\xampplite\apache\logs\error.log<br />
The common reason is, that a certain port, needed by Apache is not free.<br />
For example it might be 443, 80, etc&#8230; In my case Port 443 was taken from my VMWare workstation.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webigniter.wordpress.com/634/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webigniter.wordpress.com/634/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webigniter.wordpress.com/634/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webigniter.wordpress.com/634/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webigniter.wordpress.com/634/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webigniter.wordpress.com/634/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webigniter.wordpress.com/634/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webigniter.wordpress.com/634/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webigniter.wordpress.com/634/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webigniter.wordpress.com/634/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webigniter.wordpress.com/634/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webigniter.wordpress.com/634/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webigniter.wordpress.com/634/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webigniter.wordpress.com/634/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=634&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webigniter.wordpress.com/2011/11/23/apache-wont-start-as-a-service-while-using-xampp-xampplite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6fdff6cf4a6174b9ab2faa05a0c07362?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wyand</media:title>
		</media:content>
	</item>
		<item>
		<title>box-shadow does not work in internet explorer</title>
		<link>http://webigniter.wordpress.com/2011/11/14/box-shadow-does-not-work-in-internet-explorer/</link>
		<comments>http://webigniter.wordpress.com/2011/11/14/box-shadow-does-not-work-in-internet-explorer/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 13:01:26 +0000</pubDate>
		<dc:creator>wyand</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[box-shadow]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://webigniter.wordpress.com/?p=608</guid>
		<description><![CDATA[Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ Code Mamba!You can read the same article on our new domain by clicking here! If you&#8217;re using box-shadow as a CSS property in your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=608&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:20px;background-color:red;padding:10px;">Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ <a style="color:orange;text-decoration:none;" href="http://codemamba.com/">Code Mamba</a>!</span><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:10px;background-color:orange;padding:5px;"><a style="color:white;" href="http://codemamba.com/box-shadow-does-not-work-in-internet-explorer/">You can read the same article on our new domain by clicking here!</a></span><br />
If you&#8217;re using box-shadow as a CSS property in your Internet Explorer 9 and the box-shadow does not show you might want to check if:<br />
You&#8217;re using the right syntaxys &#8211; you can check if the property appears in the developers window (F12) for the current element.<br />
If this does not help you might want to know, that box-shadow is supported for Internet Explorer 9+, so if you are using<br />
<pre class="brush: plain;">&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=EmulateIE8&quot; /&gt;</pre><br />
in your page with Internet Explorer 9 or if you are using Internet Explorer 8 (or lower) box-shadow will not work.<br />
If you want a similar effect in Internet Explorer 8 read <a href="http://webigniter.wordpress.com/2011/11/14/box-shadow-in-internet-explorer-8/">this</a> article.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webigniter.wordpress.com/608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webigniter.wordpress.com/608/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webigniter.wordpress.com/608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webigniter.wordpress.com/608/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webigniter.wordpress.com/608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webigniter.wordpress.com/608/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webigniter.wordpress.com/608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webigniter.wordpress.com/608/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webigniter.wordpress.com/608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webigniter.wordpress.com/608/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webigniter.wordpress.com/608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webigniter.wordpress.com/608/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webigniter.wordpress.com/608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webigniter.wordpress.com/608/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=608&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webigniter.wordpress.com/2011/11/14/box-shadow-does-not-work-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6fdff6cf4a6174b9ab2faa05a0c07362?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wyand</media:title>
		</media:content>
	</item>
		<item>
		<title>box-shadow in Internet Explorer 8</title>
		<link>http://webigniter.wordpress.com/2011/11/14/box-shadow-in-internet-explorer-8/</link>
		<comments>http://webigniter.wordpress.com/2011/11/14/box-shadow-in-internet-explorer-8/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 12:59:44 +0000</pubDate>
		<dc:creator>wyand</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[box-shadow]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://webigniter.wordpress.com/?p=605</guid>
		<description><![CDATA[Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ Code Mamba!You can read the same article on our new domain by clicking here! Internet Explorer 8 does not support box-shadow property. If you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=605&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:20px;background-color:red;padding:10px;">Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ <a style="color:orange;text-decoration:none;" href="http://codemamba.com/">Code Mamba</a>!</span><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:10px;background-color:orange;padding:5px;"><a style="color:white;" href="http://codemamba.com/box-shadow-in-internet-explorer-8/">You can read the same article on our new domain by clicking here!</a></span><br />
Internet Explorer 8 does not support box-shadow property.<br />
If you want a similar effect in Internet Explorer 8 you can use the combination of Internet Explorer-only filters:<br />
<pre class="brush: plain;">filter: progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=0);
filter: progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=90);
filter: progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=180);
filter: progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=270);</pre><br />
Here&#8217;s how to combine them:<br />
<pre class="brush: plain;">filter: progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=0),
	progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=90),
	progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=180),
	progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=270);</pre><br />
Here&#8217;s our test code:<br />
<pre class="brush: plain;">&lt;div id=&quot;test&quot;&gt;&lt;/div&gt;</pre><br />
and here are our stylesheets for Internet Explorer 8 and Internet Explorer 9:<br />
<pre class="brush: plain;">
	#test
	{
		width:100px;
		height:100px;
		border:1px solid black;
		box-shadow:0 0 1.0em hsla(0, 0%, 0%, 0.3);
		/* IE 9 */
	}
</pre><br />
<pre class="brush: plain;">
	#test
	{
		width:100px;
		height:100px;
		border:1px solid black;
		filter: progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=0),
		progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=90),
		progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=180),
		progid:DXImageTransform.Microsoft.Shadow(Color=#404040, Strength=3, Direction=270);
		/* IE 8 */
	}
</pre><br />
and here&#8217;s how it looks in Internet Explorer 8 and in Internet Explorer 9:<br />
<img src="http://webigniter.files.wordpress.com/2011/11/ies.jpg?w=700" alt="Internet Explorer 8 and in Internet Explorer 9 box-shadows" /><br />
You might want to try and play with the Strength property of the filters.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webigniter.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webigniter.wordpress.com/605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webigniter.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webigniter.wordpress.com/605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webigniter.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webigniter.wordpress.com/605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webigniter.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webigniter.wordpress.com/605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webigniter.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webigniter.wordpress.com/605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webigniter.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webigniter.wordpress.com/605/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webigniter.wordpress.com/605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webigniter.wordpress.com/605/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=605&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webigniter.wordpress.com/2011/11/14/box-shadow-in-internet-explorer-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6fdff6cf4a6174b9ab2faa05a0c07362?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wyand</media:title>
		</media:content>

		<media:content url="http://webigniter.files.wordpress.com/2011/11/ies.jpg" medium="image">
			<media:title type="html">Internet Explorer 8 and in Internet Explorer 9 box-shadows</media:title>
		</media:content>
	</item>
		<item>
		<title>Using variables from the global JS scope with selenium IDE</title>
		<link>http://webigniter.wordpress.com/2011/09/17/using-variables-from-the-global-js-scope-with-selenium-ide/</link>
		<comments>http://webigniter.wordpress.com/2011/09/17/using-variables-from-the-global-js-scope-with-selenium-ide/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 10:15:29 +0000</pubDate>
		<dc:creator>wyand</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://webigniter.wordpress.com/?p=601</guid>
		<description><![CDATA[Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ Code Mamba!You can read the same article on our new domain by clicking here! To use a variable from your page you need a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=601&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:20px;background-color:red;padding:10px;">Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ <a style="color:orange;text-decoration:none;" href="http://codemamba.com/">Code Mamba</a>!</span><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:10px;background-color:orange;padding:5px;"><a style="color:white;" href="http://codemamba.com/using-variables-from-the-global-js-scope-with-selenium-ide/">You can read the same article on our new domain by clicking here!</a></span><br />
To use a variable from your page you need a reference to the current window. This is how to refer the current window:<br />
<pre class="brush: jscript;">this.browserbot.getUserWindow();</pre><br />
For example:<br />
<pre class="brush: jscript;">echo javascript{this.browserbot.getUserWindow().test}</pre><br />
will result:<br />
<pre class="brush: jscript;">[info] echo: TEST_VARIABLE_GOES_HERE</pre><br />
where your sourcecode is:<br />
<pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot;&gt;
    var test = 'TEST_VARIABLE_GOES_HERE';
&lt;/script&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webigniter.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webigniter.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webigniter.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webigniter.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webigniter.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webigniter.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webigniter.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webigniter.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webigniter.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webigniter.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webigniter.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webigniter.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webigniter.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webigniter.wordpress.com/601/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=601&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webigniter.wordpress.com/2011/09/17/using-variables-from-the-global-js-scope-with-selenium-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6fdff6cf4a6174b9ab2faa05a0c07362?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wyand</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a 4 digit input field using javascript</title>
		<link>http://webigniter.wordpress.com/2011/09/16/creating-a-4-digit-input-field-using-javascript/</link>
		<comments>http://webigniter.wordpress.com/2011/09/16/creating-a-4-digit-input-field-using-javascript/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 09:19:39 +0000</pubDate>
		<dc:creator>wyand</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://webigniter.wordpress.com/?p=598</guid>
		<description><![CDATA[Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ Code Mamba!You can read the same article on our new domain by clicking here! In this tutorial we&#8217;ll make a 4 digit html input. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=598&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:20px;background-color:red;padding:10px;">Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ <a style="color:orange;text-decoration:none;" href="http://codemamba.com/">Code Mamba</a>!</span><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:10px;background-color:orange;padding:5px;"><a style="color:white;" href="http://codemamba.com/creating-a-4-digit-input-field-using-javascript/">You can read the same article on our new domain by clicking here!</a></span><br />
In this tutorial we&#8217;ll make a 4 digit html input. We&#8217;ll use a standard input with a &#8216;postcode&#8217; class:<br />
<pre class="brush: xml;">&lt;input type=&quot;text&quot; class=&quot;postcode&quot; /&gt;</pre><br />
In the end of the document, or in a <pre class="brush: jscript;">$(document).ready(function(){});</pre> block we&#8217;ll bind a function to the keydown event for each element:<br />
<pre class="brush: jscript;">
$('.postcode').each(function(){
	$(this).bind('keydown',function(e){
		//... code goes here
	});
});
</pre><br />
Now we&#8217;ll get the event code and we&#8217;will filter it:<br />
<pre class="brush: jscript;">
var codelen = 4;
var code = (e.keyCode ? e.keyCode : e.which);
if(
	!((code &gt;= 48 &amp;&amp; code &lt;= 57 &amp;&amp; $(this).val().length &lt; codelen)
	|| (code &gt;= 96 &amp;&amp; code &lt;= 105 &amp;&amp; $(this).val().length &lt; codelen)
	|| code == 8 || code == 116 || code == 46
	|| (code &gt;= 35 &amp;&amp; code &lt;= 40)
	)
)
{
	e.preventDefault();
}
</pre><br />
With this filter we allow any button from 0 to 9 including those in the num pad if the characters in this input are less then codelen.<br />
We also allow the buttons backspace, delete and F5 (8,116,46).<br />
We also allow all the arrows + Home and End buttons.<br />
Every other event is prevented. The full code is:<br />
<pre class="brush: jscript;">
$('.postcode').each(function(){
	$(this).bind('keydown',function(e){
		var codelen = 4;
		var code = (e.keyCode ? e.keyCode : e.which);
		if(
			!((code &gt;= 48 &amp;&amp; code &lt;= 57 &amp;&amp; $(this).val().length &lt; codelen)//0-9
			|| (code &gt;= 96 &amp;&amp; code &lt;= 105 &amp;&amp; $(this).val().length &lt; codelen)//0-9
			|| code == 8 || code == 116 || code == 46//bs del f5
			|| (code &gt;= 35 &amp;&amp; code &lt;= 40)//arrows, home, end
			)
		)
		{
			e.preventDefault();
		}
	});
});
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webigniter.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webigniter.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webigniter.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webigniter.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webigniter.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webigniter.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webigniter.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webigniter.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webigniter.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webigniter.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webigniter.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webigniter.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webigniter.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webigniter.wordpress.com/598/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=598&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webigniter.wordpress.com/2011/09/16/creating-a-4-digit-input-field-using-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6fdff6cf4a6174b9ab2faa05a0c07362?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wyand</media:title>
		</media:content>
	</item>
		<item>
		<title>Useful CSS reseter</title>
		<link>http://webigniter.wordpress.com/2011/09/15/useful-css-reseter/</link>
		<comments>http://webigniter.wordpress.com/2011/09/15/useful-css-reseter/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 07:28:33 +0000</pubDate>
		<dc:creator>wyand</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[reseter]]></category>

		<guid isPermaLink="false">http://webigniter.wordpress.com/?p=593</guid>
		<description><![CDATA[Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ Code Mamba!You can read the same article on our new domain by clicking here! When you start a new project a very important thing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=593&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:20px;background-color:red;padding:10px;">Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ <a style="color:orange;text-decoration:none;" href="http://codemamba.com/">Code Mamba</a>!</span><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:10px;background-color:orange;padding:5px;"><a style="color:white;" href="http://codemamba.com/useful-css-reseter/">You can read the same article on our new domain by clicking here!</a></span><br />
When you start a new project a very important thing to do is to start using a CSS reseter.<br />
The goal the reseter is to reduce browser inconsistencies in things like default margins and font sizes of headings, line heights and more.<br />
In most of my projects I&#8217;m using this CSS reseter and I&#8217;m quite pleased with it, so I want to share it:</p>
<p><pre class="brush: css;">
html,body,div,span,applet,object,iframe,
h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,
acronym,address,big,cite,code,del,dfn,em,
img,ins,kbd,q,s,samp,small,strike,strong,
sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,
li,fieldset,form,label,legend,time,audio,
video,table,caption,tbody,tfoot,thead,tr,
th,td,article,aside,canvas,details,embed,
mark,figure,figcaption,footer,header,
hgroup,menu,nav,output,ruby,section,summary
{margin:0;padding:0;border:0;font-size:100%;
font:inherit;vertical-align:baseline;}
article,aside,details,figcaption,figure,footer,
header,hgroup,menu,nav,section{display:block;}
body{line-height:1;}table{border-spacing:0;}
blockquote,q{quotes:none;}ol,ul{list-style:none;}
blockquote:before,blockquote:after,q:before,
q:after{content:'';content:none;}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webigniter.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webigniter.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webigniter.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webigniter.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webigniter.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webigniter.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webigniter.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webigniter.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webigniter.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webigniter.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webigniter.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webigniter.wordpress.com/593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webigniter.wordpress.com/593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webigniter.wordpress.com/593/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=593&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webigniter.wordpress.com/2011/09/15/useful-css-reseter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6fdff6cf4a6174b9ab2faa05a0c07362?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wyand</media:title>
		</media:content>
	</item>
		<item>
		<title>Opening and moving windows in Javascript</title>
		<link>http://webigniter.wordpress.com/2011/09/14/opening-and-moving-windows-in-javascript/</link>
		<comments>http://webigniter.wordpress.com/2011/09/14/opening-and-moving-windows-in-javascript/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 10:59:03 +0000</pubDate>
		<dc:creator>wyand</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://webigniter.wordpress.com/?p=589</guid>
		<description><![CDATA[Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ Code Mamba!You can read the same article on our new domain by clicking here! As many of you know we can open a window [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=589&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:20px;background-color:red;padding:10px;">Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ <a style="color:orange;text-decoration:none;" href="http://codemamba.com/">Code Mamba</a>!</span><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:10px;background-color:orange;padding:5px;"><a style="color:white;" href="http://codemamba.com/opening-and-moving-windows-in-javascript/">You can read the same article on our new domain by clicking here!</a></span><br />
As many of you know we can open a window in javascript using:<br />
<pre class="brush: jscript;">window.open(&quot;some-page.htm&quot;,&quot;window-name&quot;,&quot;width=450,height=450&quot;);</pre><br />
The first argument is the URL of the new window, the second one is the window name and the third one is a list of comma-separated items.<br />
Now how to move the new window? window.open returns an object. We have to catch that object and then use it. Here&#8217;s how to move the window to the top left corner:<br />
<pre class="brush: jscript;">
newWin = window.open(&quot;some-page.htm&quot;,&quot;window-name&quot;,&quot;width=450,height=450&quot;);
newWin.moveTo(0,0);
</pre><br />
Here&#8217;s how to center the window:<br />
<pre class="brush: jscript;">
var width = 500;
var height = 600;
newWin = window.open(&quot;some-page.htm&quot;,&quot;window-name&quot;,&quot;width=&quot;+width+&quot;,height=&quot;+height);
newWin.moveTo(screen.width/2-width/2,screen.height/2-height/2);
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webigniter.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webigniter.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webigniter.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webigniter.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webigniter.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webigniter.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webigniter.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webigniter.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webigniter.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webigniter.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webigniter.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webigniter.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webigniter.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webigniter.wordpress.com/589/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=589&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webigniter.wordpress.com/2011/09/14/opening-and-moving-windows-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6fdff6cf4a6174b9ab2faa05a0c07362?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wyand</media:title>
		</media:content>
	</item>
		<item>
		<title>How to use a crossdomain JSON request using jQuery</title>
		<link>http://webigniter.wordpress.com/2011/08/26/how-to-use-a-crossdomain-json-request-using-jquery/</link>
		<comments>http://webigniter.wordpress.com/2011/08/26/how-to-use-a-crossdomain-json-request-using-jquery/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 09:56:41 +0000</pubDate>
		<dc:creator>wyand</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[crossdomain]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://webigniter.wordpress.com/?p=581</guid>
		<description><![CDATA[Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ Code Mamba!You can read the same article on our new domain by clicking here! First you have to create your client script. We&#8217;ll include [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=581&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:20px;background-color:red;padding:10px;">Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ <a style="color:orange;text-decoration:none;" href="http://codemamba.com/">Code Mamba</a>!</span><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:10px;background-color:orange;padding:5px;"><a style="color:white;" href="http://codemamba.com/how-to-use-a-crossdomain-json-request-using-jquery/">You can read the same article on our new domain by clicking here!</a></span><br />
First you have to create your client script. We&#8217;ll include the jQuery librry and we&#8217;ll create a standard ajax request:<br />
<pre class="brush: xml;">
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	$.ajax({
		error: function(jqXHR,textStatus,errorThrown){alert(textStatus+' '+errorThrown)},
		url: &quot;http://www.yourdomain.com/json.php&quot;,
		success: function(data){alert(data)},
		dataType: 'json',
		data: {}
	});
&lt;/script&gt;
</pre><br />
Now you will most likely get the following error:<br />
<pre class="brush: plain;">
	Origin http://www.yourdomain.com is not allowed by Access-Control-Allow-Origin.
</pre><br />
So it&#8217;s time to set your server the right way:<br />
If your are using something like this:<br />
<pre class="brush: php;">
	&lt;?php
		echo json_encode(array('a','r','r','a','y'));
	?&gt;
</pre><br />
it will not work. You have to specify Access-Control-Allow-Origin access. You can enable it for one site, or you can give access to all websites. Here&#8217;s how to do it:<br />
<pre class="brush: php;">
	&lt;?php
		header('Access-Control-Allow-Origin: *');
		echo json_encode(array('a','r','r','a','y'));
	?&gt;
</pre><br />
and the result is:<br />
<img src="http://webigniter.files.wordpress.com/2011/08/json.png?w=700" alt="Crossdomain JSON" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webigniter.wordpress.com/581/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webigniter.wordpress.com/581/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webigniter.wordpress.com/581/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webigniter.wordpress.com/581/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webigniter.wordpress.com/581/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webigniter.wordpress.com/581/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webigniter.wordpress.com/581/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webigniter.wordpress.com/581/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webigniter.wordpress.com/581/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webigniter.wordpress.com/581/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webigniter.wordpress.com/581/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webigniter.wordpress.com/581/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webigniter.wordpress.com/581/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webigniter.wordpress.com/581/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=581&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webigniter.wordpress.com/2011/08/26/how-to-use-a-crossdomain-json-request-using-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6fdff6cf4a6174b9ab2faa05a0c07362?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wyand</media:title>
		</media:content>

		<media:content url="http://webigniter.files.wordpress.com/2011/08/json.png" medium="image">
			<media:title type="html">Crossdomain JSON</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL_CALC_FOUND_ROWS and FOUND_ROWS() simulation in PostgreSQL</title>
		<link>http://webigniter.wordpress.com/2011/08/25/sql_calc_found_rows-and-found_rows-simulation-in-postgresql/</link>
		<comments>http://webigniter.wordpress.com/2011/08/25/sql_calc_found_rows-and-found_rows-simulation-in-postgresql/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 08:39:37 +0000</pubDate>
		<dc:creator>wyand</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[full-text-search]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://webigniter.wordpress.com/?p=577</guid>
		<description><![CDATA[Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ Code Mamba!You can read the same article on our new domain by clicking here! In MySQL you can select a record set with a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=577&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:20px;background-color:red;padding:10px;">Do you know we&#8217;ve moved on a new address. There will be no new articles on this blog anymore. If you still want to keep in touch with us, follow us @ <a style="color:orange;text-decoration:none;" href="http://codemamba.com/">Code Mamba</a>!</span><span style="color:white;text-align:center;display:block;font-weight:bold;font-size:10px;background-color:orange;padding:5px;"><a style="color:white;" href="http://codemamba.com/sql_calc_found_rows-and-found_rows-simulation-in-postgresql/">You can read the same article on our new domain by clicking here!</a></span><br />
In MySQL you can select a record set with a limit and an offset and then return the count(*) of all the records without running the same query like this:<br />
<pre class="brush: sql;">
SELECT SQL_CALC_FOUND_ROWS
  Id, Name
FROM my_table
WHERE
  Name LIKE '%prashant%'
LIMIT 0, 10;
SELECT FOUND_ROWS();
</pre><br />
In PostgreSQL there is no such thing, so you have to be creative. What we&#8217;ll do is:<br />
1. Create a temp table with all the required data.<br />
2. Select the data from the temp table with the limit and the offset.<br />
3. Select the count(*) from the temp table.<br />
4. Select everything else you need from the temp table.<br />
5. Drop the temp table.<br />
Why and when is this a good idea.<br />
When your query has many limitaons like a full-text-search clause:<br />
<pre class="brush: sql;">...WHERE textsearchable_index_col @@@ q...</pre><br />
or when your data is a join from many tables &#8211; you don&#8217;t have to join the tables many times &#8211; for the data, for the count(*), and for everything else.<br />
Here&#8217;s the example:<br />
<pre class="brush: sql;">
select * into tmp_tbl from tbl where [limitations];
select * from tmp_tbl offset 10 limit 10;
select count(*) from tmp_tbl;
drop table tmp_tbl;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webigniter.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webigniter.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webigniter.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webigniter.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webigniter.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webigniter.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webigniter.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webigniter.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webigniter.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webigniter.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webigniter.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webigniter.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webigniter.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webigniter.wordpress.com/577/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webigniter.wordpress.com&amp;blog=19337099&amp;post=577&amp;subd=webigniter&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webigniter.wordpress.com/2011/08/25/sql_calc_found_rows-and-found_rows-simulation-in-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6fdff6cf4a6174b9ab2faa05a0c07362?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">wyand</media:title>
		</media:content>
	</item>
	</channel>
</rss>
