<?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>xperiments.es &#187; Development</title>
	<atom:link href="http://xperiments.es/blog/en/category/dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://xperiments.es/blog</link>
	<description>Desarrollo web freelance &#124; Expertos en flash &#124; Barcelona Perpignan</description>
	<lastBuildDate>Sat, 11 Feb 2012 18:31:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>i5hare project launched.</title>
		<link>http://xperiments.es/blog/en/i5hare-project-launched/</link>
		<comments>http://xperiments.es/blog/en/i5hare-project-launched/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 00:13:00 +0000</pubDate>
		<dc:creator>xperiments</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://xperiments.es/blog/?p=483</guid>
		<description><![CDATA[
i5hare lets you share links instantly between any device.

No download or installation required
Share links between 2 computers
Share links from your phone to your desktop
Share links from your desktop to your phone
Share links phone-to-phone
Messages are Securely Encrypted
No more manually copying links!!!

]]></description>
			<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "http://xperiments.es/blog/en/i5hare-project-launched/", "i5hare project launched.", "" );
		//--></script></span><p><a href="http://www.i5hare.com"><img src="http://www.i5hare.com/images/logo.png" alt="" width="284" height="73" /></a></p>
<div class="wp-caption alignnone" style="width: 510px"><img src="http://www.i5hare.com/images/app_screenshot.jpg" alt="i5hare Main Screen capture" width="195" height="291" /><img src="http://www.i5hare.com/images/screenshot_3.jpg" alt="i5hare Capture" width="195" height="291" /><p class="wp-caption-text">i5hare Main Screen capture</p></div>
<h4><a href="http://www.i5hare.com">i5hare</a> lets you share links instantly between any device.</h4>
<ul>
<li>No download or installation required</li>
<li>Share links between 2 computers</li>
<li>Share links from your phone to your desktop</li>
<li>Share links from your desktop to your phone</li>
<li>Share links phone-to-phone</li>
<li>Messages are Securely Encrypted</li>
<li>No more manually copying links!!!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://xperiments.es/blog/en/i5hare-project-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable iTunes FileSharing on AIR for iOS Devices</title>
		<link>http://xperiments.es/blog/en/how-to-enable-itunes-filesharing-on-air-for-ios-devices/</link>
		<comments>http://xperiments.es/blog/en/how-to-enable-itunes-filesharing-on-air-for-ios-devices/#comments</comments>
		<pubDate>Sat, 07 May 2011 09:18:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://xperiments.es/blog/?p=471</guid>
		<description><![CDATA[I was searching the net to find a way to enable FileSharing with itunes on my AIR for IOS app.
After some research, this is the simple way it can be done:

Edit your application descriptor xml file
In the InfoAdditions section add the next two lines of code
Recompile you project and update the app via iTunes
After sync ]]></description>
			<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "http://xperiments.es/blog/en/how-to-enable-itunes-filesharing-on-air-for-ios-devices/", "How to enable iTunes FileSharing on AIR for iOS Devices", "" );
		//--></script></span><p>I was searching the net to find a way to enable FileSharing with itunes on my AIR for IOS app.</p>
<p>After some research, this is the simple way it can be done:</p>
<ul>
<li>Edit your application descriptor xml file</li>
<li>In the InfoAdditions section add the next two lines of code</li>
<li>Recompile you project and update the app via iTunes</li>
<li>After sync with iTunes, your app now can share files within the app Documents directory</li>
</ul>
<div class="codecolorer-container actionscript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>key<span style="color: #66cc66;">&gt;</span>UIFileSharingEnabled<span style="color: #66cc66;">&lt;/</span>key<span style="color: #66cc66;">&gt;</span><br />
<span style="color: #66cc66;">&lt;</span>true<span style="color: #66cc66;">/&gt;</span></div></td></tr></tbody></table></div>
<p>Enjoy!!</p>
]]></content:encoded>
			<wfw:commentRss>http://xperiments.es/blog/en/how-to-enable-itunes-filesharing-on-air-for-ios-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StageWebViewBridge. Updated. Automatic cache creation.</title>
		<link>http://xperiments.es/blog/en/stagewebviewbridge-updated-automatic-cache-creation/</link>
		<comments>http://xperiments.es/blog/en/stagewebviewbridge-updated-automatic-cache-creation/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 01:42:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://xperiments.es/blog/?p=452</guid>
		<description><![CDATA[StageWebViewBridge class was upgraded with new features for managing files in the cache.
With the new system it is possible to forget if a cached file is updated, the system does everything for us and finally we get 2 output directories. These 2 directories are the directories we must include in our final package release.
The new ]]></description>
			<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "http://xperiments.es/blog/en/stagewebviewbridge-updated-automatic-cache-creation/", "StageWebViewBridge. Updated. Automatic cache creation.", "" );
		//--></script></span><p>StageWebViewBridge class was upgraded with new features for managing files in the cache.</p>
<p>With the new system it is possible to forget if a cached file is updated, the system does everything for us and finally we get 2 output directories. These 2 directories are the directories we must include in our final package release.</p>
<p>The new methods and properties:</p>
<div class="codecolorer-container actionscript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">// sets Debug mode on/off</span><br />
StageWebViewBridge.<span style="color: #006600;">DEBUGMODE</span> = <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">false</span>;</div></td></tr></tbody></table></div>
<div class="codecolorer-container actionscript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">// sets the default dir to 'htmlFiles'</span><br />
StageWebViewBridge.<span style="color: #006600;">setRootFolder</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'htmlFiles'</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// this will create 2 new dirs</span><br />
app:<span style="color: #66cc66;">/</span>htmlFilesCache<br />
app:<span style="color: #66cc66;">/</span>htmlFilesSource</div></td></tr></tbody></table></div>
<div class="codecolorer-container actionscript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">// Change the extensions of the files to parse.</span><br />
<span style="color: #808080; font-style: italic;">// Default extensions are [&quot;html&quot;,&quot;htm&quot;,&quot;css&quot;,&quot;js&quot;]</span><br />
<br />
<span style="color: #808080; font-style: italic;">// now limit the files to be html or js, and left intact the css and htm files</span><br />
StageWebViewBridge.<span style="color: #006600;">setSourceFileExtensions</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'html'</span>,<span style="color: #ff0000;">'js'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</div></td></tr></tbody></table></div>
<p>More info in the official project page: <a href="http://code.google.com/p/stagewebviewbridge">stagewebviewbridge</a></p>
]]></content:encoded>
			<wfw:commentRss>http://xperiments.es/blog/en/stagewebviewbridge-updated-automatic-cache-creation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StageWebView StageWebViewBridge Communicating between actionscript and javascript  and vice versa</title>
		<link>http://xperiments.es/blog/en/stagewebviewbridge-comunicacion-entre-actionscript-y-javascript-y-viceversa/</link>
		<comments>http://xperiments.es/blog/en/stagewebviewbridge-comunicacion-entre-actionscript-y-javascript-y-viceversa/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 19:56:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://xperiments.es/blog/?p=444</guid>
		<description><![CDATA[I have made an extended StageWebView Class that lets you:
* Communicate Actionscript with Javascript.
* Communicate Javascript with Actionscript.
* Load local files and resources in a easy way.
* Extend loadString method with AS3 &#8211; JS communication.
By example you can call javascript from as3
12// call javascript with callack function
webView.bridge.call&#40;'someFunctionToCall', callBackFunction, ...arguments &#41;;
// reference local resources in a ]]></description>
			<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "http://xperiments.es/blog/en/stagewebviewbridge-comunicacion-entre-actionscript-y-javascript-y-viceversa/", "StageWebView StageWebViewBridge Communicating between actionscript and javascript  and vice versa", "" );
		//--></script></span><p>I have made an extended StageWebView Class that lets you:</p>
<p>* Communicate Actionscript with Javascript.<br />
* Communicate Javascript with Actionscript.<br />
* Load local files and resources in a easy way.<br />
* Extend loadString method with AS3 &#8211; JS communication.</p>
<p>By example you can call javascript from as3</p>
<div class="codecolorer-container actionscript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">// call javascript with callack function</span><br />
webView.<span style="color: #006600;">bridge</span>.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'someFunctionToCall'</span>, callBackFunction, ...<span style="color: #0066CC;">arguments</span> <span style="color: #66cc66;">&#41;</span>;</div></td></tr></tbody></table></div>
<p>// reference local resources in a easy way</p>
<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;appfile:/image.png&quot;</span><span style="color: #339933;">&gt;</span></div></td></tr></tbody></table></div>
<p>You can find it at:</p>
<p><a href="http://code.google.com/p/stagewebviewbridge/">http://code.google.com/p/stagewebviewbridge/</a></p>
<p>I will post a tutorial here&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://xperiments.es/blog/en/stagewebviewbridge-comunicacion-entre-actionscript-y-javascript-y-viceversa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Injecting inline formated xml in javascript</title>
		<link>http://xperiments.es/blog/en/inyectando-xml-con-formato-dentro-de-javascript/</link>
		<comments>http://xperiments.es/blog/en/inyectando-xml-con-formato-dentro-de-javascript/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 15:16:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xperiments.es/blog/?p=425</guid>
		<description><![CDATA[Sometimes is good tho have some code like this:
1234var html =
&#60;form&#62;
&#160; &#160; &#60;input type=&#34;text&#34;&#62;
&#60;/form&#62;;
But for now is not posible to do until E4X is adopted by all the browsers&#8230;
A tricky way to do it is to use the javascript /*! comments */ inside a function definition, to store the real formated xml.
How to define a ]]></description>
			<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "http://xperiments.es/blog/en/inyectando-xml-con-formato-dentro-de-javascript/", "Injecting inline formated xml in javascript", "" );
		//--></script></span><p>Sometimes is good tho have some code like this:</p>
<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> html <span style="color: #339933;">=</span><br />
<span style="color: #339933;">&lt;</span>form<span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text&quot;</span><span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;;</span></div></td></tr></tbody></table></div>
<p>But for now is not posible to do until E4X is adopted by all the browsers&#8230;</p>
<p>A tricky way to do it is to use the javascript /*! comments */ inside a function definition, to store the real formated xml.</p>
<p>How to define a variable in comments:</p>
<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">/*!<br />
&nbsp; &nbsp; {&quot;embed&quot;:{ &quot;id&quot;:&quot;form&quot; } }<br />
&nbsp; &nbsp; &lt;form&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;user&quot;/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;password&quot;/&gt;<br />
&nbsp; &nbsp; &lt;/form&gt; <br />
&nbsp; &nbsp; */</span></div></td></tr></tbody></table></div>
<p>First line begins with a normal multiline comment /* and the ! simbol, ATTENTION, that way, starting width /*! we tell some javascripts mimimizers that this is a special comment and they must left the comments as is in the source code.<br />
Second line tells the parser the variable asignation name of the content.<br />
The declaration must end width the close comment tag */ in a new line.</p>
<p>Full example:</p>
<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> data <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">/*!<br />
&nbsp; &nbsp; {&quot;embed&quot;:{ &quot;id&quot;:&quot;form&quot; } }<br />
&nbsp; &nbsp; &lt;form&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;user&quot;/&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;password&quot;/&gt;<br />
&nbsp; &nbsp; &lt;/form&gt; <br />
&nbsp; &nbsp; */</span><br />
<br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">/*!<br />
&nbsp; &nbsp; {&quot;embed&quot;:{ &quot;id&quot;:&quot;button&quot;} }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;button value=&quot;Send&quot;&gt;<br />
&nbsp; &nbsp; */</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> parsedData <span style="color: #339933;">=</span> window.<span style="color: #660066;">parseEmbeds</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span> parsedData.<span style="color: #660066;">form</span> <span style="color: #009900;">&#41;</span><br />
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span> parsedData.<span style="color: #660066;">button</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>The main parseEmbeds function:</p>
<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:400px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; window.<span style="color: #660066;">parseEmbeds</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> fn<span style="color: #339933;">,</span> opt <span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span> &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> dataObj <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> regex_comments <span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">/\*(.|[\r\n])*?\*/gi</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> code <span style="color: #339933;">=</span> fn.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span> regex_comments <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> comment<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> lines<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> outputString<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> trim11 <span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>str<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>str <span style="color: #339933;">=</span> str.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^\s+/</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>for <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> str.<span style="color: #660066;">length</span> <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/\S/</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>str.<span style="color: #660066;">charAt</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>str <span style="color: #339933;">=</span> str.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> i <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>break<span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">return</span> str<span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>code.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span> &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; comment <span style="color: #339933;">=</span> code<span style="color: #009900;">&#91;</span> i <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> comment.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'{&quot;embed&quot;:'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!=-</span><span style="color: #CC0000;">1</span> <span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lines <span style="color: #339933;">=</span> comment.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; outputString <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">var</span> e<span style="color: #339933;">=</span><span style="color: #CC0000;">2</span><span style="color: #339933;">;</span> e<br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;</span>lines.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> e<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;outputString<span style="color: #339933;">+=</span>trim11<span style="color: #009900;">&#40;</span>lines<span style="color: #009900;">&#91;</span>e<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dataObj<span style="color: #009900;">&#91;</span> JSON.<span style="color: #660066;">parse</span><span style="color: #009900;">&#40;</span> lines<span style="color: #009900;">&#91;</span> <span style="color: #CC0000;">1</span> <span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">embed</span>.<span style="color: #660066;">id</span> <span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> outputString<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> dataObj<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://xperiments.es/blog/en/inyectando-xml-con-formato-dentro-de-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSX 5005:Unknown error optimizing byte code</title>
		<link>http://xperiments.es/blog/en/osx-5005unknown-error-optimizing-byte-code/</link>
		<comments>http://xperiments.es/blog/en/osx-5005unknown-error-optimizing-byte-code/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 12:29:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AS2]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://xperiments.es/blog/?p=405</guid>
		<description><![CDATA[Working in a large AIR project, the flash compiler give me this strange error:
15005:Unknown error optimizing byte code
To avoid it , we must increase the memory of the compilator by creating a file in:
1~/.MacOSX/environment.plist
and put this text in it:
12345678&#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62;
&#60;!DOCTYPE plist PUBLIC &#34;-//Apple//DTD PLIST 1.0//EN&#34; &#34;http://www.apple.com/DTDs/PropertyList-1.0.dtd&#34;&#62;
&#60;plist version=&#34;1.0&#34;&#62;
&#60;dict&#62;
&#60;key&#62;JAVA_TOOL_OPTIONS&#60;/key&#62;
&#60;string&#62;-Xmx512m&#60;/string&#62;
&#60;/dict&#62;
&#60;/plist&#62;
If you use flash CS5 also edit this ]]></description>
			<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "http://xperiments.es/blog/en/osx-5005unknown-error-optimizing-byte-code/", "OSX 5005:Unknown error optimizing byte code", "" );
		//--></script></span><p>Working in a large AIR project, the flash compiler give me this strange error:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">5005:Unknown error optimizing byte code</div></td></tr></tbody></table></div>
<p>To avoid it , we must increase the memory of the compilator by creating a file in:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">~/.MacOSX/environment.plist</div></td></tr></tbody></table></div>
<p>and put this text in it:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;<br />
&lt;plist version=&quot;1.0&quot;&gt;<br />
&lt;dict&gt;<br />
&lt;key&gt;JAVA_TOOL_OPTIONS&lt;/key&gt;<br />
&lt;string&gt;-Xmx512m&lt;/string&gt;<br />
&lt;/dict&gt;<br />
&lt;/plist&gt;</div></td></tr></tbody></table></div>
<p>If you use flash CS5 also edit this file:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">~/Library/Application Support/Adobe/Flash CS5/en_US/Configuration/ActionScript3.0/jvm.ini</div></td></tr></tbody></table></div>
<p>Then change -Xmx128m to -Xmx512m</p>
]]></content:encoded>
			<wfw:commentRss>http://xperiments.es/blog/en/osx-5005unknown-error-optimizing-byte-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSX Messenger all my contacts was unadmitted</title>
		<link>http://xperiments.es/blog/en/osx-messenger-all-my-contacts-was-unadmitted/</link>
		<comments>http://xperiments.es/blog/en/osx-messenger-all-my-contacts-was-unadmitted/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 16:25:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://xperiments.es/blog/?p=387</guid>
		<description><![CDATA[A strange thing happened to my messenger, it was opened it today and my surprise was that all the contacts I have are listed as ( not allowed ).
Searching the net I find the solution.
Close MSN and open a terminal window and move to this directory:
1/ Users / &#60;- OUR USER -&#62; / Library / ]]></description>
			<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "http://xperiments.es/blog/en/osx-messenger-all-my-contacts-was-unadmitted/", "OSX Messenger all my contacts was unadmitted", "" );
		//--></script></span><p>A strange thing happened to my messenger, it was opened it today and my surprise was that all the contacts I have are listed as ( not allowed ).</p>
<p>Searching the net I find the solution.</p>
<p>Close MSN and open a terminal window and move to this directory:</p>
<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">/</span> Users <span style="color: #009966; font-style: italic;">/ &lt;- OUR USER -&gt; /</span> Library <span style="color: #009966; font-style: italic;">/ Preferences /</span> Microsoft</div></td></tr></tbody></table></div>
<p>There you find a file named:</p>
<p>Microsoft Messenger User Cache.plist</p>
<p>What we have to do is rename the extension to any other (eg. Bak) to restart MSN after re-create your configuration settings.</p>
<p>We do this process by:</p>
<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mv Microsoft \ Messenger \ User \ Cache.<span style="color: #660066;">plist</span> Microsoft \ Messenger \ User \ Cache.<span style="color: #660066;">bak</span></div></td></tr></tbody></table></div>
<p>Reboot MSN to see that everything worked properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://xperiments.es/blog/en/osx-messenger-all-my-contacts-was-unadmitted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jsPDF An javascript utility library for generate PDF&#8217;s</title>
		<link>http://xperiments.es/blog/en/jspdf-utilidad-javascript-para-generar-pdfs/</link>
		<comments>http://xperiments.es/blog/en/jspdf-utilidad-javascript-para-generar-pdfs/#comments</comments>
		<pubDate>Mon, 10 May 2010 15:36:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://xperiments.es/blog/?p=384</guid>
		<description><![CDATA[jsPDF is a javascript utility library for generate PDF&#8217;s
With only 5.8kb it let us to generate PDF&#8217;S dynamically.
Is compatible with Safari, Firefox 3.5 y iPhone Safari.
1234567891011jsPDF.init&#40;&#41;;
jsPDF.addPage&#40;&#41;;
jsPDF.text&#40;20, 20, 'Hello world!'&#41;;
jsPDF.text&#40;20, 30, 'This is client-side Javascript, pumping out a PDF.'&#41;;
jsPDF.addPage&#40;&#41;;
jsPDF.text&#40;20, 20, 'Do you like that?'&#41;;

// Making Data URI
var out = jsPDF.output&#40;&#41;;
var url = 'data:application/pdf;base64,' + Base64.encode&#40;out&#41;;
document.location.href = ]]></description>
			<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "http://xperiments.es/blog/en/jspdf-utilidad-javascript-para-generar-pdfs/", "jsPDF An javascript utility library for generate PDF&#8217;s", "" );
		//--></script></span><p><a href="http://code.google.com/p/jspdf/">jsPDF</a> is a javascript utility library for generate PDF&#8217;s<br />
With only 5.8kb it let us to generate PDF&#8217;S dynamically.<br />
Is compatible with Safari, Firefox 3.5 y iPhone Safari.</p>
<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">jsPDF.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
jsPDF.<span style="color: #660066;">addPage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
jsPDF.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">20</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">20</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Hello world!'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
jsPDF.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">20</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'This is client-side Javascript, pumping out a PDF.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
jsPDF.<span style="color: #660066;">addPage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
jsPDF.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">20</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">20</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Do you like that?'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #006600; font-style: italic;">// Making Data URI</span><br />
<span style="color: #003366; font-weight: bold;">var</span> out <span style="color: #339933;">=</span> jsPDF.<span style="color: #660066;">output</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> <span style="color: #3366CC;">'data:application/pdf;base64,'</span> <span style="color: #339933;">+</span> Base64.<span style="color: #660066;">encode</span><span style="color: #009900;">&#40;</span>out<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
document.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> url<span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://xperiments.es/blog/en/jspdf-utilidad-javascript-para-generar-pdfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone &amp; iPod Detection</title>
		<link>http://xperiments.es/blog/en/detectando-iphone-ipad-ipod/</link>
		<comments>http://xperiments.es/blog/en/detectando-iphone-ipad-ipod/#comments</comments>
		<pubDate>Thu, 06 May 2010 20:23:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://xperiments.es/blog/?p=378</guid>
		<description><![CDATA[For detecting iPhone / iPod / iPad users and redirecting them to their iPhone-compatible website you can use this simple code snippets:
PHP
123456789if&#40;
&#160; &#160; strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;,'iPhone'&#41; &#124;&#124;
&#160; &#160; strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;,'iPod'&#41; &#124;&#124;
&#160; &#160; strstr&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;,'iPad'&#41;
&#41;
&#123;
&#160; &#160; header&#40;'Location: http://yoursite.com/iphone'&#41;;
&#160; &#160; exit&#40;&#41;;
&#125;
Javascript
12345678if&#40;
&#160; &#160; &#40;navigator.userAgent.match&#40;/iPhone/i&#41;&#41; &#124;&#124;
&#160; &#160; &#40;navigator.userAgent.match&#40;/iPod/i&#41;&#41; &#124;&#124;
&#160; &#160; &#40;navigator.userAgent.match&#40;/iPad/i&#41;&#41;
&#41;
&#123;
&#160; &#160; //Your redirection code here
&#125;
.htaccess
12345678RewriteCond %&#123;HTTP_USER_AGENT&#125; ^.*iPad.*$
RewriteRule ^&#40;.*&#41;$ http://ipad.yourdomain.com [R=301]
RewriteCond %&#123;HTTP_USER_AGENT&#125; ^.*iPhone.*$
RewriteRule ]]></description>
			<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "http://xperiments.es/blog/en/detectando-iphone-ipad-ipod/", "iPhone &#038; iPod Detection", "" );
		//--></script></span><p>For detecting iPhone / iPod / iPad users and redirecting them to their iPhone-compatible website you can use this simple code snippets:</p>
<h3>PHP</h3>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/strstr"><span style="color: #990000;">strstr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'iPhone'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/strstr"><span style="color: #990000;">strstr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'iPod'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/strstr"><span style="color: #990000;">strstr</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'iPad'</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Location: http://yoursite.com/iphone'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<h3>Javascript</h3>
<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/iPhone/i</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/iPod/i</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/iPad/i</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">//Your redirection code here</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<h3>.htaccess</h3>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP_USER_AGENT<span style="color: #009900;">&#125;</span> ^<span style="color: #339933;">.*</span>iPad<span style="color: #339933;">.*</span>$<br />
RewriteRule ^<span style="color: #009900;">&#40;</span><span style="color: #339933;">.*</span><span style="color: #009900;">&#41;</span>$ http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//ipad.yourdomain.com [R=301]</span><br />
RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP_USER_AGENT<span style="color: #009900;">&#125;</span> ^<span style="color: #339933;">.*</span>iPhone<span style="color: #339933;">.*</span>$<br />
RewriteRule ^<span style="color: #009900;">&#40;</span><span style="color: #339933;">.*</span><span style="color: #009900;">&#41;</span>$ http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//mobile.yourdomain.com [R=301]</span><br />
RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP_USER_AGENT<span style="color: #009900;">&#125;</span> ^<span style="color: #339933;">.*</span>BlackBerry<span style="color: #339933;">.*</span>$<br />
RewriteRule ^<span style="color: #009900;">&#40;</span><span style="color: #339933;">.*</span><span style="color: #009900;">&#41;</span>$ http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//mobile.yourdomain.com [R=301]</span><br />
RewriteCond <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>HTTP_USER_AGENT<span style="color: #009900;">&#125;</span> ^<span style="color: #339933;">.*</span>Palm<span style="color: #339933;">.*</span>$<br />
RewriteRule ^<span style="color: #009900;">&#40;</span><span style="color: #339933;">.*</span><span style="color: #009900;">&#41;</span>$ http<span style="color: #339933;">:</span><span style="color: #666666; font-style: italic;">//mobile.yourdomain.com [R=301]</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://xperiments.es/blog/en/detectando-iphone-ipad-ipod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ultra-light jQuery calendar</title>
		<link>http://xperiments.es/blog/en/ultra-light-jquery-calendar/</link>
		<comments>http://xperiments.es/blog/en/ultra-light-jquery-calendar/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 21:35:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://xperiments.es/blog/?p=371</guid>
		<description><![CDATA[New concept for date selection jquery calendar.

Autor Blog: http://roberto.open-lab.com/2010/04/06/ultra-light-jquery-calendar/
Download page: http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp
Download: Ultra-light jQuery calendar
]]></description>
			<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "http://xperiments.es/blog/en/ultra-light-jquery-calendar/", "Ultra-light jQuery calendar", "" );
		//--></script></span><p>New concept for date selection jquery calendar.</p>
<p><img src="http://xperiments.es/blog/wp-content/uploads/2010/04/jquery_calendar1.png" alt="" title="jquery_calendar2"/><img src="http://xperiments.es/blog/wp-content/uploads/2010/04/jquery_calendar2.png" alt="" title="jquery_calendar2"/></p>
<p>Autor Blog: <a href="http://roberto.open-lab.com/2010/04/06/ultra-light-jquery-calendar/">http://roberto.open-lab.com/2010/04/06/ultra-light-jquery-calendar/</a><br />
Download page: <a href="http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp">http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp</a><br />
Download: <a href='http://xperiments.es/blog/wp-content/uploads/2010/04/calendarPicker.zip'>Ultra-light jQuery calendar</a></p>
]]></content:encoded>
			<wfw:commentRss>http://xperiments.es/blog/en/ultra-light-jquery-calendar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

