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

<channel>
	<title>Web Development Blog &#187; Tutorials</title>
	<atom:link href="http://eisabainyo.net/weblog/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://eisabainyo.net/weblog</link>
	<description>Web Development, Web Design, Web Applications, Web 2.0, AJAX, WordPress Themes, Search Engine Optimisation, Latest Technologies and more..</description>
	<lastBuildDate>Tue, 24 Jan 2012 08:29:05 +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>Embed a YouTube video iframe in a phonegap app</title>
		<link>http://eisabainyo.net/weblog/2012/01/24/embed-a-youtube-video-iframe-in-phonegap-app/</link>
		<comments>http://eisabainyo.net/weblog/2012/01/24/embed-a-youtube-video-iframe-in-phonegap-app/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 08:29:05 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1858</guid>
		<description><![CDATA[This tutorial will teach you how to embed a YouTube video iframe in a phonegap app.  In this tutorial, I am using phonegap version 1.2.0.   Youtube will automatically convert the flash video into HTML5 video tag so you don&#8217;t have to worry about encoding the video.  
HTML:
Go to YouTube and get [...]<p>Read <a href="http://eisabainyo.net/weblog/2012/01/24/embed-a-youtube-video-iframe-in-phonegap-app/">Embed a YouTube video iframe in a phonegap app</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/27/code-to-embed-google-map-and-street-view/" rel="bookmark" title="April 27, 2009">Code to embed Google Map and Street View</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/06/12/making-a-website-iphone-friendly-using-css/" rel="bookmark" title="June 12, 2009">Making a website iPhone-friendly using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/11/29/how-to-customise-your-facebook-fan-page/" rel="bookmark" title="November 29, 2010">How to customise your Facebook Fan Page with FBML</a></li>

<li><a href="http://eisabainyo.net/weblog/2005/12/26/transitional-vs-strict/" rel="bookmark" title="December 26, 2005">Transitional vs. Strict</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/29/creating-a-contact-form-in-jquery-mobile-and-php/" rel="bookmark" title="June 29, 2011">Creating a Contact Form in jQuery Mobile and PHP</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/" rel="bookmark" title="May 29, 2010">Click to copy and open site script</a></li>
</ul><!-- Similar Posts took 33.150 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>This tutorial will teach you how to embed a YouTube video iframe in a phonegap app.  In this tutorial, I am using phonegap version 1.2.0.   Youtube will automatically convert the flash video into HTML5 video tag so you don&#8217;t have to worry about encoding the video.  </p>
<p><strong>HTML:</strong></p>
<p>Go to YouTube and get embed code for the video that you wish to include into your phonegap app.   Note that not all YouTube videos can be played from a phonegap app due to restrictions placed in the videos.  </p>
<pre>

&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;YouTube video&lt;/title&gt;
		&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;&quot; /&gt;
		&lt;meta name=&quot;apple-mobile-web-app-capable&quot; content=&quot;yes&quot; /&gt;
		&lt;meta name=&quot;apple-mobile-web-app-status-bar-style&quot; content=&quot;black&quot; /&gt;
		&lt;script src=&quot;phonegap-1.2.0.js&quot;&gt;&lt;/script&gt;
	&lt;/head&gt;
	&lt;body&gt;

        &lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/9HDeEbJyNK8&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;

    &lt;/body&gt;
&lt;/html&gt;
</pre>
<p><strong>Changes to PhoneGap.plist</strong></p>
<p>Change/add the following values in PhoneGap.plist file of your app.  </p>
<pre>
MediaPlaybackRequiresUserAction: NO
AllowInlineMediaPlayback: YES
OpenAllWhitelistURLsInWebView: YES
ExternalHosts
          *.youtube.com
          *.ytimg.com
</pre>
<p><img src="http://eisabainyo.net/weblog/wp-content/uploads/2012/01/phonegap-plist.jpg" alt="" title="phonegap.plist" width="500" height="313" class="alignnone size-full wp-image-1859" /></p>
<p>And that&#8217;s it!  You should now be able to run the app on Simulator or an iOS device and be able to play the youtube video using the default video player that comes with the device (for example, QuickTime player for iPhone and iPad).</p>
<p>Read <a href="http://eisabainyo.net/weblog/2012/01/24/embed-a-youtube-video-iframe-in-phonegap-app/">Embed a YouTube video iframe in a phonegap app</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/27/code-to-embed-google-map-and-street-view/" rel="bookmark" title="April 27, 2009">Code to embed Google Map and Street View</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/06/12/making-a-website-iphone-friendly-using-css/" rel="bookmark" title="June 12, 2009">Making a website iPhone-friendly using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/11/29/how-to-customise-your-facebook-fan-page/" rel="bookmark" title="November 29, 2010">How to customise your Facebook Fan Page with FBML</a></li>

<li><a href="http://eisabainyo.net/weblog/2005/12/26/transitional-vs-strict/" rel="bookmark" title="December 26, 2005">Transitional vs. Strict</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/29/creating-a-contact-form-in-jquery-mobile-and-php/" rel="bookmark" title="June 29, 2011">Creating a Contact Form in jQuery Mobile and PHP</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/" rel="bookmark" title="May 29, 2010">Click to copy and open site script</a></li>
</ul><!-- Similar Posts took 15.482 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2012/01/24/embed-a-youtube-video-iframe-in-phonegap-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Contact Form in jQuery Mobile and PHP</title>
		<link>http://eisabainyo.net/weblog/2011/06/29/creating-a-contact-form-in-jquery-mobile-and-php/</link>
		<comments>http://eisabainyo.net/weblog/2011/06/29/creating-a-contact-form-in-jquery-mobile-and-php/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 06:39:11 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1758</guid>
		<description><![CDATA[Here is a step-by-step tutorial on how to create a contact form in jQuery Mobile.  I have also included complete php source code that can be used as a web service to send emails from your server.  
1. Create a folder structure
The first thing you need to do is create a folder structure [...]<p>Read <a href="http://eisabainyo.net/weblog/2011/06/29/creating-a-contact-form-in-jquery-mobile-and-php/">Creating a Contact Form in jQuery Mobile and PHP</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2012/01/14/display-location-aware-google-map-on-page-load-with-jquery-mobile/" rel="bookmark" title="January 14, 2012">Display a location-aware google map on page load with jQuery mobile</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/" rel="bookmark" title="September 1, 2010">10 Useful jQuery Snippets</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/" rel="bookmark" title="January 31, 2011">Top 10 jQuery Mobile Code Snippets that you need to know</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/20/store-login-information-in-cookie-using-jquery/" rel="bookmark" title="February 20, 2009">Store login information in cookie using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/17/dropdown-menu-population-using-json-and-jquery/" rel="bookmark" title="July 17, 2009">Dropdown menu population using JSON and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/" rel="bookmark" title="June 23, 2011">10 Useful Javascript Snippets for your mobile websites</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/28/check-username-availability-using-ajax-and-jquery/" rel="bookmark" title="May 28, 2009">Check username availability using AJAX and jQuery</a></li>
</ul><!-- Similar Posts took 67.338 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>Here is a step-by-step tutorial on how to create a contact form in jQuery Mobile.  I have also included complete php source code that can be used as a web service to send emails from your server.  </p>
<p><strong>1. Create a folder structure<br />
</strong>The first thing you need to do is create a folder structure where all your files will live.  My folder structure is as follows:</p>
<pre>- www
-- api
--- send.php
-- js
--- contact.js
-- css
--- contact.css
-- index.html
</pre>
<p><strong>2. Copy and paste the following boilerplate template</strong><br />
This will go into index.html file that you&#8217;ve created.  Note that we are including the Javascript and CSS files from the jQuery Mobile server.  You can also download the latest version of <a href="http://jquerymobile.com/">jQuery Mobile</a> from the website and include the local copy.  </p>
<pre>
&lt;!DOCTYPE html&gt;
&lt;html&gt;
	&lt;head&gt;
	&lt;title&gt;Contact Us&lt;/title&gt;
	&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot; /&gt;
	&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css&quot; /&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.6.1.min.js&quot;&gt;&lt;/script&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt; 

&lt;div data-role=&quot;page&quot;&gt;

	&lt;div data-role=&quot;header&quot;&gt;
		&lt;h1&gt;Contact Us&lt;/h1&gt;
	&lt;/div&gt;&lt;!-- /header --&gt;

	&lt;div data-role=&quot;content&quot;&gt;
		&lt;!-- Content goes here --&gt;
	&lt;/div&gt;&lt;!-- /content --&gt;

	&lt;div data-role=&quot;footer&quot;&gt;
		&lt;p&gt;Source code by &lt;a href=&quot;http://eisabainyo.net/weblog&quot; rel=&quot;external&quot;&gt;Web Development Blog&lt;/a&gt;.  Check out &lt;a href=&quot;http://eisabainyo.net/weblog/tips-resources&quot; rel=&quot;external&quot;&gt;tip &amp;amp; resources&lt;/a&gt; for Web Developers.&lt;/a&gt;&lt;/p&gt;
	&lt;/div&gt;&lt;!-- /footer --&gt;
&lt;/div&gt;&lt;!-- /page --&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><strong>3. Add HTML form in the content area</strong><br />
Add the following code into &lt;div data-role=&#8221;content&#8221;&gt;</p>
<pre>
		&lt;div class=&quot;contact-thankyou&quot; style="display: none;"&gt;
			Thank you.  Your message has been sent.  We will get back to you as soon as we can.
		&lt;/div&gt;
		&lt;div class=&quot;contact-form&quot;&gt;
			&lt;p class=&quot;mandatory&quot;&gt;* indicates Manadatory Field&lt;/p&gt;
			&lt;div data-role=&quot;fieldcontain&quot; class=&quot;text-field&quot;&gt;
				&lt;label for=&quot;firstname&quot;&gt;First Name*:&lt;/label&gt;
				&lt;input type=&quot;text&quot; name=&quot;firstname&quot; value=&quot;&quot; placeholder=&quot;&quot; class=&quot;required&quot; id=&quot;firstname&quot; /&gt;
			&lt;/div&gt;
			&lt;div data-role=&quot;fieldcontain&quot; class=&quot;text-field&quot;&gt;
				&lt;label for=&quot;surname&quot;&gt;Last Name:&lt;/label&gt;
				&lt;input type=&quot;text&quot; name=&quot;surname&quot; value=&quot;&quot; placeholder=&quot;&quot; id=&quot;surname&quot; /&gt;
			&lt;/div&gt;
			&lt;div data-role=&quot;fieldcontain&quot; class=&quot;text-field&quot;&gt;
				&lt;label for=&quot;email&quot;&gt;Email Address*:&lt;/label&gt;
				&lt;input type=&quot;email&quot; name=&quot;email&quot; value=&quot;&quot; placeholder=&quot;&quot; class=&quot;required&quot; id=&quot;email&quot;  /&gt;
			&lt;/div&gt;
			&lt;div data-role=&quot;fieldcontain&quot; class=&quot;text-field&quot;&gt;
				&lt;label for=&quot;mobilephone&quot;&gt;Mobile Number:&lt;/label&gt;
				&lt;input type=&quot;number&quot; name=&quot;mobilephone&quot; value=&quot;&quot; placeholder=&quot;&quot; id=&quot;mobilephone&quot; /&gt;
			&lt;/div&gt;
			&lt;div data-role=&quot;fieldcontain&quot;&gt;
				&lt;label for=&quot;state&quot;&gt;State:*&lt;/label&gt;
					&lt;select name=&quot;state&quot; class=&quot;required&quot; id=&quot;state&quot;&gt;
						&lt;option value=&quot;&quot; data-placeholder=&quot;true&quot;&gt;Please select your state&lt;/option&gt;
						&lt;option value=&quot;ACT&quot;&gt;ACT&lt;/option&gt;
						&lt;option value=&quot;NSW&quot;&gt;NSW&lt;/option&gt;
						&lt;option value=&quot;NT&quot;&gt;NT&lt;/option&gt;
						&lt;option value=&quot;QLD&quot;&gt;QLD&lt;/option&gt;
						&lt;option value=&quot;SA&quot;&gt;SA&lt;/option&gt;
						&lt;option value=&quot;TAS&quot;&gt;TAS&lt;/option&gt;
						&lt;option value=&quot;VIC&quot;&gt;VIC&lt;/option&gt;
						&lt;option value=&quot;WA&quot;&gt;WA&lt;/option&gt;
					&lt;/select&gt;
			&lt;/div&gt;
			&lt;div data-role=&quot;fieldcontain&quot;&gt;
				&lt;label for=&quot;message&quot;&gt;Message*:&lt;/label&gt;
				&lt;textarea name=&quot;message&quot; id=&quot;message&quot; placeholder=&quot;&quot; class=&quot;required&quot;&gt;&lt;/textarea&gt;
			&lt;/div&gt;
			&lt;div class=&quot;send&quot;&gt;&lt;a href=&quot;javascript:;&quot; data-role=&quot;button&quot; data-theme=&quot;a&quot; data-iconpos=&quot;right&quot; id=&quot;send-feedback&quot;&gt;send feedback&lt;/a&gt;&lt;/div&gt;
		&lt;/div&gt;&lt;!-- //.contact-form --&gt;
		</pre>
<p><strong>4. Create a web service in PHP to send email<br />
</strong>We have a folder called api and we will create a new file called send.php in the api folder.  You will need to change the $recipient variable.</p>
<pre>
&lt;?php
header('content-type: application/json; charset=utf-8');

if (isset($_GET[&quot;firstname&quot;])) {
	$firstname = strip_tags($_GET['firstname']);
	$surname = strip_tags($_GET['surname']);
	$email = strip_tags($_GET['email']);
	$mobilephone = strip_tags($_GET['mobilephone']);
	$state = strip_tags($_GET['state']);
	$message = strip_tags($_GET['message']);
	$header = &quot;From: &quot;. $firstname . &quot; &lt;&quot; . $email . &quot;&gt;rn&quot;; 

	$ip = $_SERVER['REMOTE_ADDR'];
	$httpref = $_SERVER['HTTP_REFERER'];
	$httpagent = $_SERVER['HTTP_USER_AGENT'];
	$today = date(&quot;F j, Y, g:i a&quot;);    

	$recipient = 'YOUREMAILADDRESS@DOMAIN.COM';
	$subject = 'Contact Form';
	$mailbody = &quot;
First Name: $firstname
Last Name: $surname
Email: $email
Mobile Phone: $mobilephone
State: $state
Message: $message

IP: $ip
Browser info: $httpagent
Referral: $httpref
Sent: $today
&quot;;
	$result = 'success';

	if (mail($recipient, $subject, $mailbody, $header)) {
		echo json_encode($result);
	}
}
?&gt;
</pre>
<p><strong>5. Add Javascript code to handle form onsubmit<br />
</strong>Create a file called contact.js with the following content and include it in your HTML file.</p>
<pre>
$('#send-feedback').live(&quot;click&quot;, function() {
	var url = 'api/send.php';
	var error = 0;
	var $contactpage = $(this).closest('.ui-page');
	var $contactform = $(this).closest('.contact-form');
	$('.required', $contactform).each(function (i) {
        if ($(this).val() === '') {
			error++;
        }
	}); // each
	if (error &gt; 0) {
			alert('Please fill in all the mandatory fields. Mandatory fields are marked with an asterisk *.');
	} else {
		var firstname = $contactform.find('input[name=&quot;firstname&quot;]').val();
		var surname = $contactform.find('input[name=&quot;surname&quot;]').val();
		var state = $contactform.find('select[name=&quot;state&quot;]').val();
		var mobilephone = $contactform.find('input[name=&quot;mobilephone&quot;]').val();
		var email = $contactform.find('input[name=&quot;email&quot;]').val();
		var message = $contactform.find('textarea[name=&quot;message&quot;]').val();	

		//submit the form
		$.ajax({
			type: &quot;GET&quot;,
			url: url,
			data: {firstname:firstname, surname:surname, state: state, mobilephone: mobilephone, email: email, message: message},
            success: function (data) {
				if (data == 'success') {
					// show thank you
					$contactpage.find('.contact-thankyou').show();
					$contactpage.find('.contact-form').hide();
				}  else {
					alert('Unable to send your message. Please try again.');
				}
			}
		}); //$.ajax

	}
	return false;
});
</pre>
<p>After completing all the above steps, you will have a fully functional contact form built using jQuery Mobile, HTML5, and PHP.  </p>
<p><img src="http://eisabainyo.net/weblog/wp-content/uploads/2011/06/contact-jquerymobile.jpg" alt="" title="Contact Form in jQuery Mobile" width="320" height="928" class="alignnone size-full wp-image-1774" /><br />
Screenshot of Contact Form in jQuery Mobile</p>
<p>Read <a href="http://eisabainyo.net/weblog/2011/06/29/creating-a-contact-form-in-jquery-mobile-and-php/">Creating a Contact Form in jQuery Mobile and PHP</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2012/01/14/display-location-aware-google-map-on-page-load-with-jquery-mobile/" rel="bookmark" title="January 14, 2012">Display a location-aware google map on page load with jQuery mobile</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/" rel="bookmark" title="September 1, 2010">10 Useful jQuery Snippets</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/" rel="bookmark" title="January 31, 2011">Top 10 jQuery Mobile Code Snippets that you need to know</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/02/20/store-login-information-in-cookie-using-jquery/" rel="bookmark" title="February 20, 2009">Store login information in cookie using jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/07/17/dropdown-menu-population-using-json-and-jquery/" rel="bookmark" title="July 17, 2009">Dropdown menu population using JSON and jQuery</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/" rel="bookmark" title="June 23, 2011">10 Useful Javascript Snippets for your mobile websites</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/28/check-username-availability-using-ajax-and-jquery/" rel="bookmark" title="May 28, 2009">Check username availability using AJAX and jQuery</a></li>
</ul><!-- Similar Posts took 16.514 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2011/06/29/creating-a-contact-form-in-jquery-mobile-and-php/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to &#8216;Post on Facebook Wall&#8217; on iPhone and Android using PhoneGap plugins</title>
		<link>http://eisabainyo.net/weblog/2011/06/25/how-to-post-on-facebook-wall-on-iphone-and-android-using-phonegap-plugins/</link>
		<comments>http://eisabainyo.net/weblog/2011/06/25/how-to-post-on-facebook-wall-on-iphone-and-android-using-phonegap-plugins/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 01:45:51 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1751</guid>
		<description><![CDATA[For iPhone / iPad (iOS)
Prerequsites
- Install ChildBrowser Phonegap plugin
- Copy FBConnectExample/FBConnect.js into your www folder and include it in your HTML file
- Read and follow the instructions from How to post to the Facebook wall in an iPhone app with phonegap, FaceBook Connect and ChildBrother plugin by MosaCrea
The Javascript(jQuery) code:


$('#share-facebook').live(&#34;touchstart touchend&#34;, function() {
	var url = [...]<p>Read <a href="http://eisabainyo.net/weblog/2011/06/25/how-to-post-on-facebook-wall-on-iphone-and-android-using-phonegap-plugins/">How to &#8216;Post on Facebook Wall&#8217; on iPhone and Android using PhoneGap plugins</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/" rel="bookmark" title="May 29, 2010">Click to copy and open site script</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/02/07/7-days-traffic-building-exercise-%e2%80%93-day-4/" rel="bookmark" title="February 7, 2010">7 Days Traffic Building Exercise – Day 4</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/02/19/tips-to-creating-an-email-signature-for-your-online-brand/" rel="bookmark" title="February 19, 2010">Tips to creating an email signature for your online brand</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/11/29/how-to-customise-your-facebook-fan-page/" rel="bookmark" title="November 29, 2010">How to customise your Facebook Fan Page with FBML</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/08/23/facebook-application-development/" rel="bookmark" title="August 23, 2007">Facebook application development</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/08/12/facebook-source-code/" rel="bookmark" title="August 12, 2007">Facebook source code</a></li>
</ul><!-- Similar Posts took 50.309 ms --></div>]]></description>
			<content:encoded><![CDATA[<p><strong>For iPhone / iPad (iOS)</strong></p>
<p>Prerequsites<br />
- Install <a href="https://github.com/jos3000/phonegap-plugins/tree/master/iPhone/ChildBrowser">ChildBrowser Phonegap plugin</a><br />
- Copy FBConnectExample/FBConnect.js into your www folder and include it in your HTML file<br />
- Read and follow the instructions from <a href="http://www.mosacrea.com/how-to-post-to-the-facebook-wall-in-an-iphone-app-with-phonegap-facebook-connect-and-childbrother-plugin/">How to post to the Facebook wall in an iPhone app with phonegap, FaceBook Connect and ChildBrother plugin by MosaCrea</a></p>
<p><strong>The Javascript(jQuery) code:<br />
</strong></p>
<pre>
$('#share-facebook').live(&quot;touchstart touchend&quot;, function() {
	var url = $(this).attr(&quot;rel&quot;);
	try {
		shareonfacebook(&quot; likes Web Development Blog by Ei Sabai.&quot;, &quot;http://eisabainyo.net/weblog/wp-content/uploads/2010/11/profile-small.gif&quot;, url);
	}
	catch(err) {
		console.log(err);
	}
	return false;
});
</pre>
<pre>
function shareonfacebook(text, image, url) {
	var client_id = &quot;xxxxxxxxxxxxx&quot;; // Your Facebook Client ID
	var redir_url = &quot;http://www.facebook.com/connect/login_success.html&quot;;

	if (typeof fbPlugin === 'undefined') {
		fbPlugin = FBConnect.install();
	}
	fbPlugin.connect(client_id, redir_url, &quot;touch&quot;);
    fbPlugin.onConnect = function() {
	    window.plugins.fbConnect.postFBWall(text, url, image, function() {
			navigator.notification.alert(
				'Thank you for sharing on Facebook.',
				function() {},
				'Thank you',
				'OK'
			);
		});
	};
}
</pre>
<p><strong>For Android</strong></p>
<p>Prerequsites<br />
- Install <a href="https://github.com/jos3000/phonegap-plugins/tree/master/Android/Facebook">Facebook for Android Phonegap plugin</a><br />
- Copy facebook.js into your www folder and include it in your HTML file</p>
<p><strong>The Javascript(jQuery) code:</strong></p>
<pre>
$('#share-facebook').live(&quot;touchstart touchend&quot;, function() {
	var url = $(this).attr(&quot;rel&quot;);
	try {
		shareonfacebook(&quot; likes Web Development Blog by Ei Sabai.&quot;, &quot;http://eisabainyo.net/weblog/wp-content/uploads/2010/11/profile-small.gif&quot;, url);
	}
	catch(err) {
		console.log(err);
	}
	return false;
});
</pre>
<pre>
function postonfacebook(text, image, url, token) {
	$.ajax({
		   type: 'POST',
		   url: &quot;https://graph.facebook.com/me/feed&quot;,
		   data: {
				message: text,
				picture: image,
				link: url,
				access_token: token,
				format: &quot;json&quot;
		   },
		   success: function (data) {
			   navigator.notification.alert(
					'Thank you for sharing on Facebook.',
					function() {},
					'Thank you',
					'OK'
				);
		   },
		   dataType: &quot;json&quot;,
		   timeout: 10000
	});
}
</pre>
<pre>
function shareonfacebook(text, image, url) {
	var client_id = &quot;xxxxxxxxxxxxx&quot;; // Your Facebook Client ID

	window.plugins.facebook.authorize(client_id, function(res){
		if (res.token !== undefined) {
			postonfacebook(text, image, url, res.token)
		} else {
			// call authorization method
			window.plugins.facebook.getAccess(function(res) {
				if (res.token !== undefined) {
					postonfacebook(text, image, url, res.token)
				}
			});
		}
	});
}
</pre>
<p><strong>Usage (for both iPhone and Android):</strong></p>
<pre>&lt;a href=&quot;#&quot; rel=&quot;http://eisabainyo.net/weblog/&quot; id=&quot;share-facebook&quot;&gt;Share on Facebook&lt;/a&gt;
</pre>
<p>Read <a href="http://eisabainyo.net/weblog/2011/06/25/how-to-post-on-facebook-wall-on-iphone-and-android-using-phonegap-plugins/">How to &#8216;Post on Facebook Wall&#8217; on iPhone and Android using PhoneGap plugins</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2010/05/29/click-to-copy-and-open-site-script/" rel="bookmark" title="May 29, 2010">Click to copy and open site script</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/02/07/7-days-traffic-building-exercise-%e2%80%93-day-4/" rel="bookmark" title="February 7, 2010">7 Days Traffic Building Exercise – Day 4</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/02/19/tips-to-creating-an-email-signature-for-your-online-brand/" rel="bookmark" title="February 19, 2010">Tips to creating an email signature for your online brand</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/11/29/how-to-customise-your-facebook-fan-page/" rel="bookmark" title="November 29, 2010">How to customise your Facebook Fan Page with FBML</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/08/23/facebook-application-development/" rel="bookmark" title="August 23, 2007">Facebook application development</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/08/12/facebook-source-code/" rel="bookmark" title="August 12, 2007">Facebook source code</a></li>
</ul><!-- Similar Posts took 15.460 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2011/06/25/how-to-post-on-facebook-wall-on-iphone-and-android-using-phonegap-plugins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to use Google Fonts in your WordPress Theme</title>
		<link>http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/</link>
		<comments>http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 10:39:19 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1730</guid>
		<description><![CDATA[Using Google Fonts in your WordPress Theme is very easy and it can be completed in 3 simple steps.  
1. 
Go to Google Web Fonts, browse all the fonts available for use on your website  and pick any font you like.  For this example, I will be using Droid Sans. 
2.
Click on [...]<p>Read <a href="http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/">How to use Google Fonts in your WordPress Theme</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2008/09/03/google-chrome-browser/" rel="bookmark" title="September 3, 2008">Google Chrome Browser</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/11/04/my-favourite-web-20-fonts/" rel="bookmark" title="November 4, 2007">My favourite web 2.0 fonts</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/30/designing-and-optimising-websites-for-ipad/" rel="bookmark" title="May 30, 2010">Designing and Optimising Websites for iPad</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/11/opacity-in-css/" rel="bookmark" title="May 11, 2009">Opacity in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/26/professional-mobile-themes-for-wordpress/" rel="bookmark" title="June 26, 2011">Professional Mobile Themes for WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/06/06/themeforest-vs-woothemes/" rel="bookmark" title="June 6, 2010">ThemeForest vs WooThemes</a></li>
</ul><!-- Similar Posts took 57.394 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>Using Google Fonts in your WordPress Theme is very easy and it can be completed in 3 simple steps.  </p>
<p><strong>1. </strong><br />
Go to <a href="http://www.google.com/webfonts">Google Web Fonts</a>, browse all the fonts available for use on your website  and pick any font you like.  For this example, I will be using <a href="http://www.google.com/webfonts/family?family=Droid+Sans&#038;subset=latin">Droid Sans</a>. </p>
<p><strong>2.</strong><br />
Click on the font name to go to the font page and then click on <strong>Use This Font</strong> tab and copy and paste the css include into the &lt;head&gt; section in Header (<strong>header.php</strong>) file of your WordPress Theme.</p>
<pre>&lt;link href='http://fonts.googleapis.com/css?family=Droid+Sans&amp;v1' rel='stylesheet' type='text/css'&gt;</pre>
<p><strong>3.</strong><br />
Edit the Stylesheet (<strong>style.css</strong>) file of your current WordPress Theme and add the following line of CSS: </p>
<pre>SELECTOR { font-family: 'Droid Sans', arial, serif; }</pre>
<p>Replace SELECTOR with the correct selector; for example: h1, .title, .post h2, etc.</p>
<p>And that&#8217;s it.  It is very simple and doesn&#8217;t require any <a href="http://eisabainyo.net/weblog/2009/04/27/sifr-vs-flir-font-replacement-techniques/">font replacement techniques</a> that use Flash or Javascript.  </p>
<p><strong>Browser Compatibility of Google Web Fonts API</strong></p>
<p>According to the Official FAQs, the Google Font API is compatible with the following browsers:</p>
<ul>
<li>Google Chrome: version 4.249.4+</li>
<li>Mozilla Firefox: version: 3.5+</li>
<li>Apple Safari: version 3.1+</li>
<li>Opera: version 10.5+</li>
<li>Microsoft Internet Explorer: version 6+</li>
</ul>
<p>It also works reliably on the vast majority of modern mobile operating systems, including Android 2.2+ and iOS 4.2+ (iPhone, iPad, iPod).</p>
<p>Read <a href="http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/">How to use Google Fonts in your WordPress Theme</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2008/09/03/google-chrome-browser/" rel="bookmark" title="September 3, 2008">Google Chrome Browser</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/11/04/my-favourite-web-20-fonts/" rel="bookmark" title="November 4, 2007">My favourite web 2.0 fonts</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/30/designing-and-optimising-websites-for-ipad/" rel="bookmark" title="May 30, 2010">Designing and Optimising Websites for iPad</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/05/11/opacity-in-css/" rel="bookmark" title="May 11, 2009">Opacity in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/26/professional-mobile-themes-for-wordpress/" rel="bookmark" title="June 26, 2011">Professional Mobile Themes for WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/06/06/themeforest-vs-woothemes/" rel="bookmark" title="June 6, 2010">ThemeForest vs WooThemes</a></li>
</ul><!-- Similar Posts took 39.469 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use hi-res images in web apps for iPhone4</title>
		<link>http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/</link>
		<comments>http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 11:24:32 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1679</guid>
		<description><![CDATA[If you have been developing websites and web apps for mobile, you may have noticed that the images are not very crisp on iPhone 4.  The Retina display on iPhone 4 is the sharpest, most vibrant, highest-resolution phone screen ever but you need to know how to utilise it.  The images you use [...]<p>Read <a href="http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/">How to use hi-res images in web apps for iPhone4</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/04/24/how-to-style-a-submit-button-in-css/" rel="bookmark" title="April 24, 2009">How to style a Submit button in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/04/22/align-an-image-in-center-and-middle-using-css/" rel="bookmark" title="April 22, 2010">Align an image in center and middle using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/06/12/making-a-website-iphone-friendly-using-css/" rel="bookmark" title="June 12, 2009">Making a website iPhone-friendly using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/09/how-to-style-a-submit-button-in-css-example-2/" rel="bookmark" title="March 9, 2010">How to style a Submit button in CSS &#8211; Example 2</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>
</ul><!-- Similar Posts took 77.578 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>If you have been developing websites and web apps for mobile, you may have noticed that the images are not very crisp on iPhone 4.  The Retina display on iPhone 4 is the sharpest, most vibrant, highest-resolution phone screen ever but you need to know how to utilise it.  The images you use on the websites need to be high resolution (at least 2 times bigger than the normal size) in order for them to look sharp on iPhone 4.  The good news is, it is possible to use hi-res images in web apps / websites for iPhone4 without using any javascript.</p>
<p><strong>For images that are displayed via &lt;img&gt; tags:</strong></p>
<p>Save the image in x2 resolution.  For example, if your logo is 50&#215;50 pixels, make sure it is saved as 100&#215;100 pixels (Resolution: 144 in Photoshop)</p>
<p>And in your HTML source code, make sure to specify height and width attributes for the &lt;img&gt; tag like below:</p>
<p><code>&lt;img src=&quot;images/logo.png&quot; alt=&quot;Web Development Blog&quot; width=&quot;50&quot; height=&quot;50&quot; /&gt;</code></p>
<p><strong>For images that are displayed as background images via CSS:</strong></p>
<p>This is a bit trickier, because you don&#8217;t want to use hi-res images for iPhone 3 or Android or other mobile browsers.  To target just iPhone 4, add the following line of code in the &lt;head&gt; section of your page right after the normal CSS include.</p>
<p><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;css/common.css&quot; /&gt;</code></p>
<p><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;css/hires.css&quot; media=&quot;only screen and (-webkit-min-device-pixel-ratio: 2)&quot;/&gt;</code></p>
<p>And for every image, you need to save 2 versions &#8211; one for the regular view and the other one for the hi-res view.  For example, button-signup.jpg and button-signup2x.jpg.  The button-signup.jpg will be 50&#215;20 pixels whereas the button-signup2x.jpg will be 100&#215;40 pixels.  </p>
<p>In your hires.css file, you will have something like the following:</p>
<p><code>#signup { background: transparent url(../images/button-signup2x.jpg) 0 0 no-repeat;  background-size: 50px 20px; }</code></p>
<p>Note that the background-size is the size of the image in regular view.  This will allow the background image to be shrunk so it fits within the specified element. The background-size property is a CSS3 property and it lets you specify the size of background images. </p>
<p>And in your style.css, you will have:</p>
<p><code>#signup { background: transparent url(../images/button-signup.jpg) 0 0 no-repeat; }</code></p>
<p>And that&#8217;s all! </p>
<p>Read <a href="http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/">How to use hi-res images in web apps for iPhone4</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/04/24/how-to-style-a-submit-button-in-css/" rel="bookmark" title="April 24, 2009">How to style a Submit button in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/04/22/align-an-image-in-center-and-middle-using-css/" rel="bookmark" title="April 22, 2010">Align an image in center and middle using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/06/12/making-a-website-iphone-friendly-using-css/" rel="bookmark" title="June 12, 2009">Making a website iPhone-friendly using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/09/how-to-style-a-submit-button-in-css-example-2/" rel="bookmark" title="March 9, 2010">How to style a Submit button in CSS &#8211; Example 2</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>
</ul><!-- Similar Posts took 18.511 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 10 jQuery Mobile Code Snippets that you need to know</title>
		<link>http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/</link>
		<comments>http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 03:48:57 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1669</guid>
		<description><![CDATA[jQuery Mobile is a framework for mobile web apps and mobile websites with an aim to provide a unified user interface system across many mobile device platforms such iPhone, BlackBerry, Android and Windows Mobile.  The framework is built on top of one of the most popular Javascript frameworks, jQuery.  
Followings are some of [...]<p>Read <a href="http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/">Top 10 jQuery Mobile Code Snippets that you need to know</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2012/01/14/display-location-aware-google-map-on-page-load-with-jquery-mobile/" rel="bookmark" title="January 14, 2012">Display a location-aware google map on page load with jQuery mobile</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/24/how-to-style-a-submit-button-in-css/" rel="bookmark" title="April 24, 2009">How to style a Submit button in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/09/how-to-style-a-submit-button-in-css-example-2/" rel="bookmark" title="March 9, 2010">How to style a Submit button in CSS &#8211; Example 2</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/" rel="bookmark" title="June 23, 2011">10 Useful Javascript Snippets for your mobile websites</a></li>
</ul><!-- Similar Posts took 30.060 ms --></div>]]></description>
			<content:encoded><![CDATA[<p><a href="http://jquerymobile.com/">jQuery Mobile</a> is a framework for mobile web apps and mobile websites with an aim to provide a unified user interface system across many mobile device platforms such iPhone, BlackBerry, Android and Windows Mobile.  The framework is built on top of one of the most popular Javascript frameworks, <a href="http://jquery.com">jQuery</a>.  </p>
<p>Followings are some of the most useful code snippets that I&#8217;ve used in my recent web app developed using jQuery Mobile framework.  </p>
<p><strong>1. Disable truncation for list items and buttons</strong></p>
<p>If your list item or button has a long text, it will be truncated automatically by jQuery Mobile.  To disable this truncation, add &#8220;<code>white-space: normal;</code>&#8221; to the CSS selector in question.  </p>
<p>For example, to disable truncation for buttons:</p>
<pre>.ui-btn-text {
white-space: normal;
}</pre>
<p>To disable truncation for list descriptions:</p>
<pre>.ui-li-desc {
white-space: normal;
}</pre>
<p>To enable truncation, set it to &#8220;<code>white-space: nowrap;</code>&#8220;.  </p>
<p><strong>2. Display a random background image on page load</strong></p>
<p>jQuery Mobile has a number of page initialization events that you can use to trigger certain methods on page load.  The following CSS + Javascript can be used to display a random background image every time a page is loaded.  </p>
<p><strong>CSS</strong></p>
<pre>
.my-page  { background: transparent url(../images/bg.jpg) 0 0 no-repeat; }

.my-page.bg1 { background: transparent url(../images/bg-1.jpg) 0 0 no-repeat; }

.my-page.bg2 { background: transparent url(../images/bg-2.jpg) 0 0 no-repeat; }

.my-page.bg3 { background: transparent url(../images/bg-3.jpg) 0 0 no-repeat; }
</pre>
<p><strong>Javascript</strong></p>
<pre>
$('.my-page').live(&quot;pagecreate&quot;, function() {
	var randombg = Math.floor(Math.random()*4); // 0 to 3
	$('.my-page').removeClass().addClass('bg' + randombg);
});</pre>
<p><strong>3. Disable a button action</strong></p>
<p>To disable a button action (for eg: from opening a page), add the following Javascript.</p>
<pre>$('#home-button').button("disable");</pre>
<p>And to re-enable it:</p>
<pre>$('#home-button').button("enable");</pre>
<p><strong>4. Disable loading pop-up message </strong></p>
<p>I find the loading pop-up message a bit annoying because it gets triggered everytime you load a different page.  To disable this: add the following line of code into your JS file.</p>
<pre>$.mobile.pageLoading(true);</pre>
<p>By default, it is enabled like so:</p>
<pre>$.mobile.pageLoading();</pre>
<p><strong>5. Create a custom theme </strong></p>
<p>jQuery Mobile framework comes with <a href="http://jquerymobile.com/test/docs/#buttons/buttons-themes.html">5 themes</a> &#8211; Theme A, Theme B, Theme C, Theme D and Theme E.   But you can easily create  a new theme for your web app.  </p>
<p>The steps to create a new theme:<br />
1. Copy CSS for any theme from jQuery Mobile CSS file and paste it into your own CSS file.<br />
2. Give your theme a name and rename the CSS selectors appropriately.  Your theme name can be any alphabet character (a to z).  So for example, if you copied Theme C, and you want to call your theme Theme Z, rename <code>.ui-btn-up-c</code> to <code>.ui-btn-up-z</code>, <code>.ui-body-c</code> to <code>.ui-body-z</code> and so on.<br />
3. Change colors and styles of your custom theme<br />
4. To apply your custom theme z to any element, just set the data-theme attribute to z.  For example:
<pre>&lt;div data-role=&quot;page&quot; data-theme=&quot;z&quot;&gt;</pre>
<p><strong>6.  Use a custom font</strong></p>
<p>There are a few font-replacement methods available such as cufon, sIFR, FLIR, @font-face and Google Fonts API.  When building a web app using jQuery Mobile, I found that @font-face method is the easiest method to work with and the performance is quite satisfactory.  If you are interested in @font-face, here is a <a href="http://net.tutsplus.com/tutorials/design-tutorials/quick-tip-how-to-work-with-font-face/">helpful tutorial with a demo</a> on how to work with @font-face method. </p>
<p><strong>7. Create an image-only button with no text</strong></p>
<p>Sometimes, you may not want to have any text for your button but still use the rest of the features that comes with a button element.  This is usually the case with a home button or an info button.  To hide any text associated with the button, set data-iconpos attribute to &#8220;notext&#8221;.  For example:</p>
<pre>&lt;a href=&quot;../index.html&quot; data-icon=&quot;grid&quot;
class=&quot;ui-btn-right&quot; data-iconpos=&quot;notext&quot;&gt;Home&lt;/a&gt;</pre>
<p><strong>8. Open a link without using AJAX with page transitions</strong></p>
<p>To open a link without using AJAX with page transitions (ie: reloading the full page the old-school way), set rel attribute to &#8220;external&#8221;.  </p>
<pre>&lt;a href=&quot;../index.html&quot; data-icon=&quot;grid&quot;
class=&quot;ui-btn-right&quot; rel=&quot;external&quot;&gt;Home&lt;/a&gt;</pre>
<p><strong>9. Remove an arrow from a list item</strong></p>
<p>By default, jQuery Mobile framework adds an arrow next to every list item.  To disable this, set data-icon attribute to &#8220;false&#8221; on the list item that you&#8217;d like the arrow to be removed.</p>
<pre>&lt;li data-icon=&quot;false&quot;&gt;&lt;a href=&quot;contact.html&quot;&gt;Contact Us&lt;/a&gt;&lt;/li&gt;</pre>
<p><strong>10. Set background color of a page</strong></p>
<p>This may sound simple but it took me a few minutes to figure out how to apply a background color to a page without having it overwritten by jQuery Mobile CSS.   Normally, you&#8217;d set a background color to body element but if you are using jQuery Mobile framework, you need to set it to ui-page class.  </p>
<pre>.ui-page {
background: #eee;
}</pre>
<h3>Recommended Books</h3>
<p><a href="http://www.amazon.com/gp/product/1449306683/ref=as_li_ss_tl?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399373&#038;creativeASIN=1449306683">jQuery Mobile</a><img src="http://www.assoc-amazon.com/e/ir?t=&#038;l=as2&#038;o=1&#038;a=1449306683&#038;camp=217145&#038;creative=399373" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p><a href="http://www.amazon.com/gp/product/1849515905/ref=as_li_ss_tl?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399373&#038;creativeASIN=1849515905">jQuery Mobile First Look</a><img src="http://www.assoc-amazon.com/e/ir?t=&#038;l=as2&#038;o=1&#038;a=1849515905&#038;camp=217145&#038;creative=399373" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p>The following two books on HTML5  and jQuery will also help you understand and work with jQuery mobile framework better as jQuery mobile is based on jQuery and uses HTML5. </p>
<div class="book"><a href="http://www.amazon.com/gp/product/0596806027/ref=as_li_ss_tl?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399369&#038;creativeASIN=0596806027"><img src="http://eisabainyo.net/weblog/wp-content/uploads/2011/06/html5.png" alt="" title="HTML5: Up and Running" width="90"  class="alignnone size-full wp-image-1128" /><span>HTML5: Up and Running</span></a>
</div>
<div class="book"><a href="http://www.amazon.com/gp/product/0980576857/ref=as_li_ss_tl?ie=UTF8&#038;tag=eisabainyonet-20&#038;linkCode=as2&#038;camp=217145&#038;creative=399369&#038;creativeASIN=0980576857"><img src="http://eisabainyo.net/weblog/wp-content/uploads/2011/06/jqueryninja.jpg" alt="" title="jQuery: Novice to Ninja" width="90" height="111" class="alignnone size-full wp-image-1127" /><span>jQuery: Novice to Ninja</span></a>
</div>
<p>Read <a href="http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/">Top 10 jQuery Mobile Code Snippets that you need to know</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2012/01/14/display-location-aware-google-map-on-page-load-with-jquery-mobile/" rel="bookmark" title="January 14, 2012">Display a location-aware google map on page load with jQuery mobile</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/24/how-to-style-a-submit-button-in-css/" rel="bookmark" title="April 24, 2009">How to style a Submit button in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/09/how-to-style-a-submit-button-in-css-example-2/" rel="bookmark" title="March 9, 2010">How to style a Submit button in CSS &#8211; Example 2</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/" rel="bookmark" title="June 23, 2011">10 Useful Javascript Snippets for your mobile websites</a></li>
</ul><!-- Similar Posts took 30.496 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to customise your Facebook Fan Page with FBML</title>
		<link>http://eisabainyo.net/weblog/2010/11/29/how-to-customise-your-facebook-fan-page/</link>
		<comments>http://eisabainyo.net/weblog/2010/11/29/how-to-customise-your-facebook-fan-page/#comments</comments>
		<pubDate>Mon, 29 Nov 2010 06:16:33 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1639</guid>
		<description><![CDATA[In this tutorial, I will show you how you can customise your Facebook Fan page quickly and  easily using the powerful Facebook Markup Language.   If you haven&#8217;t already got a Facebook Fan Page for your brand (be it website, blog or company), you might want to create one now.    [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/11/29/how-to-customise-your-facebook-fan-page/">How to customise your Facebook Fan Page with FBML</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/" rel="bookmark" title="January 31, 2011">Top 10 jQuery Mobile Code Snippets that you need to know</a></li>

<li><a href="http://eisabainyo.net/weblog/2012/01/24/embed-a-youtube-video-iframe-in-phonegap-app/" rel="bookmark" title="January 24, 2012">Embed a YouTube video iframe in a phonegap app</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/12/08/google-custom-search/" rel="bookmark" title="December 8, 2007">Google custom search engine</a></li>

<li><a href="http://eisabainyo.net/weblog/2008/05/18/display-a-flashimagetext-file-randomly-using-javascript/" rel="bookmark" title="May 18, 2008">Display a flash/image/text file randomly using javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/10/display-5-latest-posts-in-each-category-in-wordpress/" rel="bookmark" title="March 10, 2010">Display 5 latest posts in each category in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/" rel="bookmark" title="September 1, 2010">10 Useful jQuery Snippets</a></li>
</ul><!-- Similar Posts took 234.167 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>In this tutorial, I will show you how you can customise your Facebook Fan page quickly and  easily using the powerful Facebook Markup Language.   If you haven&#8217;t already got a Facebook Fan Page for your brand (be it website, blog or company), you might want to <a href="http://www.facebook.com/pages/create.php">create one</a> now.    Check out our <a href="http://www.facebook.com/pages/Webmaster-Resources/132969370047886">Webmaster Resources</a> page on Facebook for an example. </p>
<p><strong>1.  Add a new custom tab</strong></p>
<p>Most facebook fan pages have a custom tab and it is one of the most important assets that a facebook fan page should  have.  Follow the steps below to add a new tab to your Facebook Fan page:</p>
<p>1. Add <a href="http://www.facebook.com/apps/application.php?id=4949752878&#038;b">Static FBML application</a> to your fan page by clicking on Add to my Page link on the left.  </p>
<p>2. Once you&#8217;ve added the Static FBML application, go to your Fan page and click on Edit Page on the left. </p>
<p>3. When you are on the Edit screen of your Fan page, click on Applications link on the left.  You will see a list of applications that you&#8217;ve added/were added by default.  </p>
<p>4.  Look for FBML application from the list, and click on Go to application link. </p>
<p>5. You will be taken to Edit FBML page where you can change Box/Tab title and add content as you wish.  </p>
<p>6. If you wish to add more than one tab on your Fan page, click on &#8220;Add another FBML box&#8221; link at the bottom of &#8220;Edit FBML&#8221; page and repeat step 2, 3, 4 and 5 to edit the newly created tab.  </p>
<p>You can add HTML, plain text or FBML (Facebook Markup Language) in FBML box provided.   You can also add the HTML code from <a href="http://eisabainyo.net/website-templates/facebook-templates/">readymade Facebook templates</a> here.  </p>
<p><strong>2.  Make your custom tab the default tab</strong></p>
<p>To make your custom tab the default tab (ie: the tab to be displayed by default), go to your page and click on Wall tab, and click on &#8220;Settings&#8221; link under the status update area.  You can then set Default Landing Page for everyone else by choosing your custom tab name from the drop down list.  As the name suggests, the Default Landing Page is only for everyone else, and not for yourself, the admin of the page.  </p>
<p><strong>3.  Display special content for people who&#8217;ve liked your page aka your fans</strong></p>
<p>In order to do this, you will need to embed FBML (Facebook Markup Language) into your custom tab content.  <a href="http://developers.facebook.com/docs/reference/fbml/visible-to-connection">fb:visible-to-connection</a> can be used to display exclusive content if the viewer is a friend of that user or is a fan of that Facebook Page.</p>
<pre>
&lt;fb:visible-to-connection&gt;

  &lt;!-- For Fans and Friends --&gt;
	&lt;div id=&quot;promo&quot;&gt;Hey there, fans! Please check back in a week to see if you have won our fabulous prize!&lt;/div&gt;

  &lt;fb:else&gt;

	&lt;!-- For Non-Fans and Non-Friends --&gt;
	&lt;div id=&quot;promo&quot;&gt;Hey there!   Like us now for your chance to win!&lt;/div&gt;

  &lt;/fb:else&gt;

&lt;/fb:visible-to-connection&gt;
</pre>
<p><strong>4. Display content based on certain criteria</strong></p>
<p>Sometimes, you may want to display restricted content, say, a location-specific content to those who are from certain countries.  In that case, you can use <a href="http://developers.facebook.com/docs/reference/fbml/restricted-to">fb:restricted-to</a> tag.  A list of <a href="http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm">ISO county codes</a> can be found on iso.org website.  </p>
<p>For example, if you wish to display special content to visitors from Australia, the code would be:</p>
<pre>&lt;fb:restricted-to location=&quot;au&quot;&gt;
	Good day, mate!
&lt;/fb:restricted-to&gt;
</pre>
<p><strong>5.  Add a google analytics to track your Facebook page</strong></p>
<p>You can add google analytics with one line of code rather than having to copy and paste entire javascript snippet provided by google by using <a href="http://developers.facebook.com/docs/reference/fbml/google-analytics">fb:google-analytics</a> FBML tag.</p>
<pre>&lt;fb:google-analytics uacct=&quot;YOUR ID HERE&quot; /&gt;</pre>
<p><strong>6. Add social apps such as Twitter, Linked In and Slideshare</strong></p>
<p>There are quite a few social apps (or any other app for that matter) that you can add to your Facebook page.  Just go to <a href="http://www.facebook.com/apps/directory.php">Apps Directory</a>, view the app page and click on &#8220;Add to my Page&#8221; link on the left to add an app to your page.  If you need to configure an app after adding it to your Facebook page, go to your Facebook  page, click on Edit Page, click on Applications, and look for the app that you wish to configure from the list.  </p>
<p><strong>7. Embed a YouTube video </strong></p>
<p>To embed a YouTube video into your custom tab, first, you need to get the ID of the YouTube video.  In this case, it is dxzDU3tTzGA (because the url is http://www.youtube.com/watch?v=dxzDU3tTzGA) and add the following FBML code. </p>
<pre>
&lt;fb:swf swfsrc=&quot;http://www.youtube.com/v/dxzDU3tTzGA&quot;
imgsrc=&quot;http://img.youtube.com/vi/dxzDU3tTzGA/default.jpg&quot;
width=&quot;520&quot; height=&quot;415&quot; /&gt;
</pre>
<p>* Remember to replace dxzDU3tTzGA with the ID of your YouTube video. </p>
<p><strong>8. Display a random text</strong></p>
<p>Sometimes, you might want to display a random text to keep things fresh.  In that case, you can use <a href="http://developers.facebook.com/docs/reference/fbml/random">fb:random</a> tag.  The optional &#8220;weight&#8221; attribute allows you to control the frequency of an option.</p>
<pre>
&lt;fb:random&gt;
	&lt;fb:random-option weight=&quot;2&quot;&gt;A: This text appears twice as often as B.&lt;/fb:random-option&gt;
	&lt;fb:random-option weight=&quot;1&quot;&gt;B: This text appears half as often as A.&lt;/fb:random-option&gt;
&lt;/fb:random&gt;
</pre>
<p><strong>9. Display a random image</strong></p>
<p>As with displaying a random text, displaying a random image is easily achieved by using <a href="http://developers.facebook.com/docs/reference/fbml/random">fb:random</a> tag. </p>
<pre>
&lt;fb:random&gt;
	&lt;fb:random-option&gt;
		&lt;img src=&quot;http://www.facebook.com/hello.jpg&quot; alt=&quot;Hello!&quot; /&gt;
	&lt;/fb:random-option&gt;
	&lt;fb:random-option&gt;
		&lt;img src=&quot;http://www.facebook.com/aloha.jpg&quot; alt=&quot;Aloha!&quot;  /&gt;
	&lt;/fb:random-option&gt;
	&lt;fb:random-option&gt;
		&lt;img src=&quot;http://www.facebook.com/goodday.jpg&quot; alt=&quot;G'day!&quot;  /&gt;
	&lt;/fb:random-option&gt;
&lt;/fb:random&gt;
</pre>
<p>You can insert any piece of HTML code between &lt;fb:random-option&gt; tag so you can use it for so many other things &#8211; random links, videos, audios, and so on. </p>
<p><strong>10. Bonus!  Display different message for different browser</strong></p>
<p>This FBML tag is probably rarely used but you can display different messsage or image depending on the browser that the user is using.  The FBML in question is known as <a href="http://developers.facebook.com/docs/reference/fbml/user-agent">fb:user-agent</a>.</p>
<p>For example, if you wish to display a special message for IE 6 users, you can do the following:</p>
<pre>
&lt;fb:user-agent includes=&quot;ie 6&quot;&gt;
	Hi!  It appears that you're currently using Internet Explorer 6.  Please upgrade your browser.
&lt;/fb:user-agent&gt;
</pre>
<p>Read <a href="http://eisabainyo.net/weblog/2010/11/29/how-to-customise-your-facebook-fan-page/">How to customise your Facebook Fan Page with FBML</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2011/01/31/top-10-jquery-mobile-code-snippets-that-you-need-to-know/" rel="bookmark" title="January 31, 2011">Top 10 jQuery Mobile Code Snippets that you need to know</a></li>

<li><a href="http://eisabainyo.net/weblog/2012/01/24/embed-a-youtube-video-iframe-in-phonegap-app/" rel="bookmark" title="January 24, 2012">Embed a YouTube video iframe in a phonegap app</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/12/08/google-custom-search/" rel="bookmark" title="December 8, 2007">Google custom search engine</a></li>

<li><a href="http://eisabainyo.net/weblog/2008/05/18/display-a-flashimagetext-file-randomly-using-javascript/" rel="bookmark" title="May 18, 2008">Display a flash/image/text file randomly using javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/10/display-5-latest-posts-in-each-category-in-wordpress/" rel="bookmark" title="March 10, 2010">Display 5 latest posts in each category in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/05/10/how-to-customise-wordpress-admin-login-page/" rel="bookmark" title="May 10, 2010">How to customise WordPress Admin Login page</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/09/01/10-useful-jquery-snippets/" rel="bookmark" title="September 1, 2010">10 Useful jQuery Snippets</a></li>
</ul><!-- Similar Posts took 91.036 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/11/29/how-to-customise-your-facebook-fan-page/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Five Important Steps into iPhone App Development for Beginners</title>
		<link>http://eisabainyo.net/weblog/2010/11/08/five-important-steps-into-iphone-app-development-for-beginners/</link>
		<comments>http://eisabainyo.net/weblog/2010/11/08/five-important-steps-into-iphone-app-development-for-beginners/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 01:10:04 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/2010/11/08/five-important-steps-into-iphone-app-development-for-beginners/</guid>
		<description><![CDATA[So I have released two native iPhone apps in the last 2 months.  The first iPhone app is called Salary Calculator, and it was released on 06 October 2010.  The app was submitted to iTunes Connect on 28 September 2010.  
The second app was a niche app for Property Investors in Australia, [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/11/08/five-important-steps-into-iphone-app-development-for-beginners/">Five Important Steps into iPhone App Development for Beginners</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/10/27/tips-for-iphone-web-app-development/" rel="bookmark" title="October 27, 2009">Tips for iPhone Web App Development</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/08/19/official-press-release-target-tech-savvy-gen-y-customers-with-a-store-locator-for-iphone/" rel="bookmark" title="August 19, 2010">Official Press Release: Target tech-savvy Gen-Y customers with a Store Locator for iPhone</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/08/12/when-an-iphone-web-app-is-better-than-a-native-web-app/" rel="bookmark" title="August 12, 2010">When an iPhone web app is better than a native app</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/06/12/making-a-website-iphone-friendly-using-css/" rel="bookmark" title="June 12, 2009">Making a website iPhone-friendly using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/08/23/facebook-application-development/" rel="bookmark" title="August 23, 2007">Facebook application development</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/07/09/15-free-iphone-apps-for-web-developers/" rel="bookmark" title="July 9, 2011">13 FREE iPhone Apps for Web Developers</a></li>
</ul><!-- Similar Posts took 231.788 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>So I have released two native iPhone apps in the last 2 months.  The first iPhone app is called <a href="itms://itunes.apple.com/us/app/salary-calc/id395485152?mt=8">Salary Calculator</a>, and it was released on 06 October 2010.  The app was submitted to iTunes Connect on 28 September 2010.  </p>
<p>The second app was a niche app for Property Investors in Australia, called <a href="itms://itunes.apple.com/us/app/cash-flow-calc/id400074055?mt=8">Property Cash Flow Calculator</a>.  It was developed in just a few hours on one weekend, submitted to iTunes Connect on 24 October 2010 and was made available on App Store on 03 November 2010.  </p>
<p>Many people have asked me if iPhone app development is hard or if it&#8217;s worth the trouble.   My answer is while it is not super easy, it is not impossible if you&#8217;re willing to learn a new language and syntax.  It also helps if you have a goal that you want to achieve (for example, an app in mind that you wish to develop), rather than merly reading tutorials or books on iPhone app development.   I have created a few <a href="http://www.anansi.com.au/apps/">iPhone web apps</a> for my <a href="http://www.anansi.com.au/">Web Development company</a> and therefore my main goal was to convert some of them into native apps.  </p>
<p>Here are five important steps that I took before developing my first (and second) iPhone apps.  </p>
<p><strong>1.  Buy a mac.  </strong>This is one of the most expensive investments one has to make when stepping into iPhone app development.  I got myself a <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D25%26ref_%3Dnb_sb_noss%26y%3D25%26field-keywords%3DMacbook%26url%3Dsearch-alias%253Delectronics&#038;tag=eisabainyonet-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=390957">Macbook Pro</a> but a <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D25%26ref_%3Dnb_sb_noss%26y%3D25%26field-keywords%3DMacbook%26url%3Dsearch-alias%253Delectronics&#038;tag=eisabainyonet-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=390957">MacBook Air</a> or a <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D25%26ref_%3Dnb_sb_noss%26y%3D25%26field-keywords%3DMacbook%26url%3Dsearch-alias%253Delectronics&#038;tag=eisabainyonet-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=390957">Mac Mini</a> would work just fine too.   You need a mac because iPhone software development kit (SDK) only works on the Apple platform.  </p>
<p><strong>2.  Buy an iPhone.  </strong>Although it is not completely necessary, it is recommended to have an iPhone before developing an iPhone app.   Even though the iPhone SDK comes with an iPhone simulator, using an app on a real iPhone give you a much better understanding and experience of how an app works.  You can also download existing apps that are available on <a href="http://www.apple.com/iphone/apps-for-iphone/#heroOverview">App Store</a> for an inspiration.  If you don&#8217;t mind a second hand, you can get a second hand iPhone handset from <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2Fcell-phones-service-plans-accessories%2Fb%3Fie%3DUTF8%26node%3D301185%26ref_%3Dtopnav_storetab_cps&#038;tag=eisabainyonet-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=390957">Amazon</a> or <a href="http://www.ebay.com">ebay</a> for half the price.  </p>
<p><strong>3.  Download and Install <a href="http://developer.apple.com/iphone/">iPhone SDK</a>.</strong> iPhone SDK comes with XCode, iPhone Simulator and a suite of additional tools for developing apps for iPhone, iPad, and iPod touch.  According to Apple, <a href="http://developer.apple.com/technologies/tools/xcode.html">XCode</a> is the hub of your development experience and I tend to agree with that.   XCode is simply an IDE just like Eclipse or Dreamweaver but it is designed for app development on Mac.  You need XCode in order to develop, compile, test, release and submit your iPhone app.  Note that SDK can be downloaded for free of charge.  You only need to pay for the Developer Program (USD99/year) when you wish to test the app you have written on a real iPhone (instead of the iPhone Simulator) and submit it to the App Store. </p>
<p><strong>4. Read and Learn.  </strong>Now that you&#8217;ve got everything set up and ready for your first iPhone app development, start reading and learning all about how to develop an iPhone app.   This is a very important step because the learning curve can be quite steep for those who do not have C / C++ programming experience.  It is also cruicial to know common jargons used in iPhone app development, such as Interface Builder, MVC (model, view, controller), xib, nib, delegates, etc. The best place to find all the resources to learn is <a href="http://www.bestuniversities.com/blog/2009/100-free-courses-tutorials-for-aspiring-iphone-app-developers/">100 Free Courses &amp; Tutorials for Aspiring iPhone App Developers</a>.  For those wanting my recommendation on which documentation/tutorial to read first, MIT has a course on Introduction to iPhone Development and the <a href="http://courses.csail.mit.edu/iphonedev/">course outlines</a> are available online for free.  </p>
<p><strong>5.  Replicate a sample application.   </strong>The easiest and quickest way to learn the syntax of iPhone Programming Language (Objective C) is to replicate and rewrite a <a href="http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhone101/Articles/00_Introduction.html#//apple_ref/doc/uid/TP40007514">sample application</a> (Your First iOS Application) from the iOS Reference Library.  You can also follow <a href="http://www.iphonesdkarticles.com/2008/07/first-iphone-application.html">this tutorial</a> which teaches you the same thing step-by-step. </p>
<p>While I am no expert on iPhone app development and I have not learnt or understood everything there is to learn, I am happy with my progress.   The next app that I&#8217;d like to develop is something to do with databases. </p>
<p><a href="itms://itunes.apple.com/us/app/salary-calc/id395485152?mt=8">Salary Calculator</a> app was featured as one of the hottest apps under Utilities category in the App Store for 2 weeks now, and it was also featured in New &amp; Noteworthy section a week after it was released.   I am hoping the same result for <a href="itms://itunes.apple.com/us/app/cash-flow-calc/id400074055?mt=8">Property Cash Flow Calculator</a>.  Wish me luck and happy iPhone app developing!  </p>
<p>Read <a href="http://eisabainyo.net/weblog/2010/11/08/five-important-steps-into-iphone-app-development-for-beginners/">Five Important Steps into iPhone App Development for Beginners</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/10/27/tips-for-iphone-web-app-development/" rel="bookmark" title="October 27, 2009">Tips for iPhone Web App Development</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/08/19/official-press-release-target-tech-savvy-gen-y-customers-with-a-store-locator-for-iphone/" rel="bookmark" title="August 19, 2010">Official Press Release: Target tech-savvy Gen-Y customers with a Store Locator for iPhone</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/08/12/when-an-iphone-web-app-is-better-than-a-native-web-app/" rel="bookmark" title="August 12, 2010">When an iPhone web app is better than a native app</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/06/12/making-a-website-iphone-friendly-using-css/" rel="bookmark" title="June 12, 2009">Making a website iPhone-friendly using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/08/23/facebook-application-development/" rel="bookmark" title="August 23, 2007">Facebook application development</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/07/09/15-free-iphone-apps-for-web-developers/" rel="bookmark" title="July 9, 2011">13 FREE iPhone Apps for Web Developers</a></li>
</ul><!-- Similar Posts took 43.329 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/11/08/five-important-steps-into-iphone-app-development-for-beginners/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to code an HTML Email Newsletter</title>
		<link>http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/</link>
		<comments>http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/#comments</comments>
		<pubDate>Mon, 31 May 2010 06:19:58 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[xHTML]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1490</guid>
		<description><![CDATA[In this step-by-step tutorial, I&#8217;m going to show you exactly how to code an HTML email; be it an HTML Email Signature or HTML Email Newsletter.  

1.  Changing the background color

&#60;table width=&#34;100%&#34; border=&#34;0&#34; cellspacing=&#34;0&#34; cellpadding=&#34;0&#34; bgcolor=&#34;#333333&#34;&#62;
  &#60;tr&#62;
    &#60;td&#62;

	&#60;/td&#62;
   &#60;/tr&#62;
&#60;/table&#62;

2. Setting a fixed width and background color for [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/">How to code an HTML Email Newsletter</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/" rel="bookmark" title="June 20, 2011">How to use Google Fonts in your WordPress Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2005/12/26/transitional-vs-strict/" rel="bookmark" title="December 26, 2005">Transitional vs. Strict</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/24/how-to-style-a-submit-button-in-css/" rel="bookmark" title="April 24, 2009">How to style a Submit button in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/10/display-5-latest-posts-in-each-category-in-wordpress/" rel="bookmark" title="March 10, 2010">Display 5 latest posts in each category in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/04/22/align-an-image-in-center-and-middle-using-css/" rel="bookmark" title="April 22, 2010">Align an image in center and middle using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/02/14/web-20-reflection-effect-in-photoshop/" rel="bookmark" title="February 14, 2007">web 2.0 reflection effect in Photoshop</a></li>
</ul><!-- Similar Posts took 47.432 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>In this step-by-step tutorial, I&#8217;m going to show you exactly how to code an HTML email; be it an HTML Email Signature or HTML Email Newsletter.  </p>
<p><a href="http://eisabainyo.net/view/streamsend" target="_blank"><img src="http://www.awltovhc.com/image-3838536-10786843" width="300" height="100" alt="StreamSend.com" border="0"/></a></p>
<p><strong>1.  Changing the background color</strong></p>
<pre>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#333333&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;

	&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p><strong>2. Setting a fixed width and background color for the content area</strong></p>
<pre>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#333333&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;
		&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td&gt;

			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;/table&gt;
	&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p><strong>3.  Changing the font size, style and color of the content area</strong></p>
<pre>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#333333&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;
		&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td&gt;

			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;/table&gt;
	&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p><strong>4. Setting a different font, color and style for headings</strong></p>
<pre>&lt;span style=&quot;font-size: 14px; font-weight: bold; color: #ed0000;
font-family:Arial, Helvetica, sans-serif;&quot;&gt;Latest News from the Web Development Blog&lt;/span&gt;</pre>
<p><strong>5. Inserting a line between two blocks of text</strong></p>
<pre>
	&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td&gt;
				First block of text.
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;border-top: 1px solid #66666;&quot;&gt;
				Second block of text.
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;
</pre>
<p><strong>6. Inserting and floating an image to the left</strong></p>
<pre>
	&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td width=&quot;150&quot; align=&quot;left&quot; valign=&quot;top&quot;&gt;
				&lt;img src=&quot;http://full.path.to.the.image/image.jpg&quot; width=&quot;120&quot; height=&quot;100&quot; alt=&quot;My image&quot; /&gt;
			&lt;/td&gt;
			&lt;td width=&quot;450&quot; align=&quot;left&quot; valign=&quot;top&quot;&gt;
				Text next to the image
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td colspan=&quot;2&quot;&gt;
				Copyright text
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;
</pre>
<p><strong>7. Aligning text to right (or left or center)</strong></p>
<pre>
	&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;div&gt;Some text goes here&lt;/div&gt;
				&lt;div align=&quot;right&quot;&gt;&lt;a href=&quot;#&quot;&gt;Read more&lt;/a&gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;
</pre>
<p><strong>8. Changing a link color </strong></p>
<pre>&lt;a href=&quot;#&quot; style=&quot;color: #00ccff;
text-decoration: none;&quot;&gt;Read more&lt;/a&gt;</pre>
<p><strong>9. Adding a border around the content area</strong></p>
<pre>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#333333&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;
		&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px; border: 1px solid #00ccff; border-collapse: collapse;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td&gt;

			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;/table&gt;
	&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p><strong>10. Opening a link in a new window</strong></p>
<pre>&lt;a href=&quot;http://www.google.com&quot; target=&quot;_blank&quot;
style=&quot;color: #00ccff; text-decoration: none;&quot;&gt;Go to Google&lt;/a&gt;</pre>
<p><strong>Putting it altogether</strong></p>
<p><img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/05/sample-newsletter-300x280.gif" alt="" title="Sample Email Newsletter" width="300" height="280" class="alignnone size-medium wp-image-1496" /></p>
<pre>
&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;10&quot; bgcolor=&quot;#cccccc&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;
		&lt;table width=&quot;600&quot; border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;10&quot; cellspacing=&quot;5&quot; style=&quot;font-family:Arial, Helvetica, sans-serif; color: #5b656b; font-size: 12px; border: 1px solid #999999; border-collapse: collapse;&quot; bgcolor=&quot;#ffffff&quot;&gt;
		&lt;tr&gt;
			&lt;td colspan=&quot;2&quot; height=&quot;70&quot; bgcolor=&quot;#000033&quot;&gt;
				&lt;span style=&quot;font-size: 14px; font-weight: bold; color: #ff6600; font-family:Arial, Helvetica, sans-serif;&quot;&gt;Latest News from the Web Development Blog&lt;/span&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td colspan=&quot;2&quot; height=&quot;10&quot; bgcolor=&quot;#ff6600&quot;&gt;&lt;/td&gt;
		&lt;tr&gt;
		&lt;tr&gt;
			&lt;td width=&quot;150&quot; align=&quot;left&quot; valign=&quot;top&quot;&gt;
				&lt;img src=&quot;http://eisabainyo.net/weblog/wp-content/uploads/2010/05/sexy-web-design.jpg&quot; width=&quot;250&quot; height=&quot;326&quot; alt=&quot;Sexy Web Design Book Cover&quot; /&gt;
			&lt;/td&gt;
			&lt;td width=&quot;450&quot; align=&quot;left&quot; valign=&quot;top&quot;&gt;
				&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tincidunt nisl et felis sodales faucibus. In hac habitasse platea dictumst. Sed tincidunt egestas velit mollis faucibus. Aliquam feugiat, neque nec porta accumsan, odio nulla laoreet risus, ut vestibulum lacus velit eget mi. Aliquam vehicula magna sed leo lobortis et luctus magna venenatis. Nunc et massa ipsum. In tristique, elit hendrerit tincidunt consectetur, diam purus tempor ante, eget scelerisque velit est vitae lorem. Nullam vulputate blandit dui et tempor. Curabitur quam lectus, suscipit non placerat a, consectetur vel velit. &lt;/p&gt;
				&lt;p&gt;Vestibulum egestas ipsum quis elit pulvinar ullamcorper. Vestibulum ac neque sed neque consequat ornare eu et justo. Phasellus pulvinar vestibulum nisl, ut tempus dolor commodo at. Morbi ultricies nisl vel massa accumsan tempor. Donec quam nibh, euismod vitae vestibulum ac, ullamcorper non eros. Integer quis sapien ac enim rhoncus auctor. Nulla facilisi. Vivamus et varius massa. Integer aliquam ultricies risus nec vulputate. Donec porta viverra magna, a suscipit arcu porta non. &lt;/p&gt;
				&lt;div align=&quot;right&quot;&gt;&lt;a href=&quot;#&quot; style=&quot;color: #ff6600; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Read more&lt;/a&gt;&lt;/div&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td colspan=&quot;2&quot;&gt;
				&lt;p&gt;Praesent ut purus sit amet elit tincidunt laoreet a sed mauris. Integer a lacinia augue. Donec hendrerit sapien et lorem tincidunt a luctus purus vehicula. Cras magna diam, auctor sit amet pretium in, pretium a odio. Proin sed laoreet lorem. Mauris tortor diam, tempus sit amet lacinia in, egestas eu lectus. Vivamus aliquet hendrerit tellus sit amet pretium. Praesent dictum libero pretium magna pretium congue. Pellentesque consequat est a tortor tincidunt placerat in a ante. Sed non elit enim, vitae scelerisque ipsum. Integer fringilla, massa in ultrices bibendum, orci neque luctus arcu, in pulvinar elit risus eu nunc. Etiam dignissim malesuada consequat. Donec eget magna risus, eu vehicula ante. Quisque adipiscing placerat tincidunt. Aliquam ultrices vehicula velit, vel dignissim sem feugiat malesuada. Donec magna nisi, pretium at ullamcorper ultrices, sodales eu odio. Nulla facilisi. Curabitur hendrerit dictum rhoncus. Praesent bibendum dapibus ligula, ut placerat dolor vulputate vel. &lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td colspan=&quot;2&quot; bgcolor=&quot;#cccccc&quot;&gt;
				&lt;span style=&quot;font-size: 10px; font-weight: bold; color: #666666; font-family:Arial, Helvetica, sans-serif;&quot;&gt;Copyright 2010 All Rights Reserved.&lt;/span&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;
	&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p><strong>Email Newsletter Templates</strong></p>
<p>If you are looking for professional email newsletter designs, <a href="http://themeforest.net/?ref=eisabai">ThemeForest</a> is the best place to buy email newsletter templates because each template package comes with a complete HTML code and layered PSD file (and sometimes multiple color variations).  Our favourites are:</p>
<p><a href="http://themeforest.net/item/inewsletter/82750?ref=eisabai">iNewsletter<br />
<img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/05/inewsletter.jpg" alt="" title="iNewsletter" width="450" class="alignnone size-full wp-image-1498" /></a></p>
<p><a href="http://themeforest.net/item/platnum-email-template-6-layouts-8-colors/92281?ref=eisabai">Platnum<br />
<img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/05/platnum.jpg" alt="" title="Platnum" width="450" class="alignnone size-full wp-image-1499" /><br />
</a></p>
<p>Read <a href="http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/">How to code an HTML Email Newsletter</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/08/28/framebar-like-diggbar-example-in-html-and-css-with-no-javascript/" rel="bookmark" title="August 28, 2009">Framebar (like diggbar) example in html and css with no javascript</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/" rel="bookmark" title="June 20, 2011">How to use Google Fonts in your WordPress Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2005/12/26/transitional-vs-strict/" rel="bookmark" title="December 26, 2005">Transitional vs. Strict</a></li>

<li><a href="http://eisabainyo.net/weblog/2009/04/24/how-to-style-a-submit-button-in-css/" rel="bookmark" title="April 24, 2009">How to style a Submit button in CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/03/10/display-5-latest-posts-in-each-category-in-wordpress/" rel="bookmark" title="March 10, 2010">Display 5 latest posts in each category in WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/04/22/align-an-image-in-center-and-middle-using-css/" rel="bookmark" title="April 22, 2010">Align an image in center and middle using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2007/02/14/web-20-reflection-effect-in-photoshop/" rel="bookmark" title="February 14, 2007">web 2.0 reflection effect in Photoshop</a></li>
</ul><!-- Similar Posts took 15.852 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/05/31/how-to-code-an-html-email-newsletter/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Designing and Optimising Websites for iPad</title>
		<link>http://eisabainyo.net/weblog/2010/05/30/designing-and-optimising-websites-for-ipad/</link>
		<comments>http://eisabainyo.net/weblog/2010/05/30/designing-and-optimising-websites-for-ipad/#comments</comments>
		<pubDate>Sat, 29 May 2010 14:22:25 +0000</pubDate>
		<dc:creator>eisabai</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development Blog]]></category>

		<guid isPermaLink="false">http://eisabainyo.net/weblog/?p=1470</guid>
		<description><![CDATA[iPad was released a month ago, and is made available in Australia a few days ago, but already, I am seeing a lot of big name companies and brands trying to optimise thier websites for iPad.  While I have yet to optimise a website for iPad, I have put together some notes about designing [...]<p>Read <a href="http://eisabainyo.net/weblog/2010/05/30/designing-and-optimising-websites-for-ipad/">Designing and Optimising Websites for iPad</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/06/12/making-a-website-iphone-friendly-using-css/" rel="bookmark" title="June 12, 2009">Making a website iPhone-friendly using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/26/professional-mobile-themes-for-wordpress/" rel="bookmark" title="June 26, 2011">Professional Mobile Themes for WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/" rel="bookmark" title="June 23, 2011">10 Useful Javascript Snippets for your mobile websites</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/" rel="bookmark" title="June 20, 2011">How to use Google Fonts in your WordPress Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2012/01/24/embed-a-youtube-video-iframe-in-phonegap-app/" rel="bookmark" title="January 24, 2012">Embed a YouTube video iframe in a phonegap app</a></li>
</ul><!-- Similar Posts took 18.662 ms --></div>]]></description>
			<content:encoded><![CDATA[<p>iPad was released a month ago, and is made available in Australia a few days ago, but already, I am seeing a lot of big name companies and brands trying to optimise thier websites for iPad.  While I have yet to optimise a website for iPad, I have put together some notes about designing and optimising a website for iPad to help us get started soon.</p>
<p><img src="http://eisabainyo.net/weblog/wp-content/uploads/2010/05/ipad-websites.jpg" alt="" title="Designing and Optimising Websites for iPad" width="553" height="402" class="alignnone size-full wp-image-1472" /></p>
<p><strong>Screen Resolution</strong><br />
1024&#215;768 pixel resolution (9.7-inch (diagonal))<br />
This is as big as a normal computer screen.  According to the Analytics stats for this Web Development Blog, 10.47% of the total visitors have 1024&#215;768 pixel resolution.</p>
<p><strong>User Agent String</strong></p>
<pre>Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10
(KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10</pre>
<p>This is useful if you have a device detection script on your server that redirects mobile devices to a different website.  For example, since iPad doesn&#8217;t support Flash, if you have a flash website, it is a good idea to redirect iPad visitors to the HTML version of the website. </p>
<p><strong>CSS for iPad</strong></p>
<pre>&lt;link rel=&quot;stylesheet&quot; media=&quot;only screen and (min-device-width: 768px)
and (max-device-width: 1024px)&quot; href=&quot;ipad.css&quot; type=&quot;text/css&quot; /&gt;</pre>
<pre>&lt;link rel=&quot;stylesheet&quot; media=&quot;all and
(orientation:portrait)&quot; href=&quot;portrait.css&quot;&gt;</pre>
<pre>&lt;link rel=&quot;stylesheet&quot; media=&quot;all and
(orientation:landscape)&quot; href=&quot;landscape.css&quot;&gt;</pre>
<p>As with optimising websites for iPhone, you can specify a CSS file just for iPad devices.  You can also have different CSS for Portrait and Landscape orientations without using Javascript. This is useful if you want to hide certain elements (for example, sidebar) on Portrait orientation.  </p>
<p><strong>HTML 5 and CSS3</strong><br />
iPad supports HTML 5 and CSS3 so you can go crazy with box-shadows, text-shadows, border-radius, multiple backgrounds, video, canvas and geolocation features on your iPad friendly website.  </p>
<p><strong>JavaScript</strong><br />
As with iPhone, Javascript is supported on iPad.  This will enable your iPad friendly website to have web 2.0 features, AJAX, dynamic content, and animation effects.  If you are looking for a good Javascript Framework to use, check out <a href="http://jqtouch.com/">jQTouch</a> which is a jQuery plugin for mobile web development.  </p>
<p><strong>Flash</strong><br />
Neither iPad nor iPhone supports Flash.  And <a href="http://www.apple.com/hotnews/thoughts-on-flash">Steve Jobs has made it pretty clear</a> that he has no intention of supporting Flash in the near future. </p>
<p><strong>Viewport</strong></p>
<pre>&lt;meta name="viewport" content="width=device-width" /&gt;</pre>
<p>Use a constant width for viewport rather than a fixed pixel width.  Similarly, when it comes to layout design, consider Fluid width rather than Fixed width design.</p>
<p><strong>Touch not click</strong><br />
This is something to bear in mind when designing websites for iPad and iPhone.  They are both touch devices and not  point and click, so make sure there is enough padding between links (eg: Navigation items) and buttons are large enough to be <del datetime="2010-05-29T13:13:07+00:00">clicked</del> touched on.   </p>
<p><strong>iPad Friendly Website &ne; Mobile Friendly Website</strong><br />
With iPhone, you can simply redirect to your existing Mobile version of the website for iPhone users, but you can&#8217;t do the same for iPad.   iPad screen resolution is many times bigger than a normal mobile screen, hence, there will be a lot of whitespace when you view a mobile friendly website on an iPad.   For this reason, it is sometimes better to serve the same version of the web friendly website to iPad devices rather than redirecting them to the mobile version of the website which is designed for small screens.  And according to Apple, Safari on iPad is capable of delivering a &#8220;desktop&#8221; web experience.</p>
<p><strong>Preview</strong><br />
If you want to check out how your website would look in iPad without an actual iPad device, open <a href="http://ipadpeek.com/">this Simulator</a> in Safari browser and type in the address of the website you wish to view in the address bar on the iPad image (not the browser address bar).  You can click on the top left corner of the iPad image to switch between Landscape and Portrait mode.  </p>
<p>But if you have got a spare $800, you can <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26ref_%3Dsr%5Fnr%5Fseeall%5F6%26keywords%3Dapple%2520ipad%26qid%3D1275142086%26rh%3Di%253Aaps%252Ck%253Aapple%2520ipad%252Ci%253Aelectronics&#038;tag=eisabainyonet-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=390957">buy iPad</a><img src="https://www.assoc-amazon.com/e/ir?t=eisabainyonet-20&#038;l=ur2&#038;o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> from Amazon Online Store for the real deal.</p>
<p><strong>Inspiration</strong><br />
As always, Apple has a list of <a href="http://www.apple.com/ipad/ready-for-ipad/">iPad ready websites</a> for your inspiration.   If you are looking for an iPad friendly WordPress Theme, be sure to check out <a href="http://themeforest.net/item/mobility-wordpress-theme-for-web-and-ipad/103273?ref=eisabai" target="_blank">Mobility Wordpress Theme</a> that provides a touch and slide friendly user interface for iPad viewers.</p>
<p>Read <a href="http://eisabainyo.net/weblog/2010/05/30/designing-and-optimising-websites-for-ipad/">Designing and Optimising Websites for iPad</a> on Web Development Blog!</p><div><h3>Other similiar posts that you might be interested in:</h3><ul><li><a href="http://eisabainyo.net/weblog/2009/06/12/making-a-website-iphone-friendly-using-css/" rel="bookmark" title="June 12, 2009">Making a website iPhone-friendly using CSS</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/07/how-to-use-hi-res-images-for-web-apps-in-iphone4/" rel="bookmark" title="June 7, 2011">How to use hi-res images in web apps for iPhone4</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/26/professional-mobile-themes-for-wordpress/" rel="bookmark" title="June 26, 2011">Professional Mobile Themes for WordPress</a></li>

<li><a href="http://eisabainyo.net/weblog/2010/01/16/tips-on-building-websites-for-mobile-browsers/" rel="bookmark" title="January 16, 2010">Tips on building websites for mobile browsers</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/23/10-useful-javascript-snippets-for-your-mobile-site/" rel="bookmark" title="June 23, 2011">10 Useful Javascript Snippets for your mobile websites</a></li>

<li><a href="http://eisabainyo.net/weblog/2011/06/20/how-to-use-google-fonts-in-your-wordpress-theme/" rel="bookmark" title="June 20, 2011">How to use Google Fonts in your WordPress Theme</a></li>

<li><a href="http://eisabainyo.net/weblog/2012/01/24/embed-a-youtube-video-iframe-in-phonegap-app/" rel="bookmark" title="January 24, 2012">Embed a YouTube video iframe in a phonegap app</a></li>
</ul><!-- Similar Posts took 9.934 ms --></div>]]></content:encoded>
			<wfw:commentRss>http://eisabainyo.net/weblog/2010/05/30/designing-and-optimising-websites-for-ipad/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

