There is an issue with jQuery.get() in Internet Explorer when trying to update content on the fly because IE caches XMLHttpRequest response and the AJAX call made via jQuery.get() is therefore always returning the same result. I encountered this problem when I was writing a function similar to facebook Like feature where the [...]

Continue reading Troubleshooting jQuery.get() Cache issue in Internet Explorer

To display 5 latest posts in each parent category of your WordPress blog, add the following code into the template that you want the result to appear. In our case, we added the following code into our 404 template page (404.php of current theme). Other places that you might want to display [...]

Continue reading Display 5 latest posts in each category in WordPress

web 2.0 style call-to-action buttons can be purchased in psd format from graphic river
Since writing How to style a Submit button in CSS a few months ago, I have found an alternative way to achieve the same result. In this example, we will be using <button> tag instead of <input> tag. [...]

Continue reading How to style a Submit button in CSS – Example 2

To turn off iPhone auto correction feature (predictive dictionary) on textboxes, add autocorrect=”off” attribute to your input tag.

<input type="text" id="keyword" name="keyword"
autocorrect="off" />

You can also turn off auto capitalising/capitalizing feature by adding autocapitalize=”off” attribute.

<input type="text" id="keyword" name="keyword"
autocorrect="off" autocapitalize="off" />

And lastly, you can turn off auto complete in a similar way.

<input type="text" id="keyword" name="keyword"
autocorrect="off" autocapitalize="off" [...]

Continue reading How to disable text auto correction in iPhone web app

Comments Off

Here is how to create a custom archive page in WordPress just like the one you see on our blog.
1. Go to the current theme folder of your WordPress installation (wp-content/themes/*current theme*) and make sure you don’t already have archives.php in the folder
2. Create a new file called archives.php (or whatever file name [...]

Continue reading 5 steps to creating a custom Archive page in WordPress

Google Search has recently introduced breadcrumbs in their Search Result Snippets replacing the URL displayed below the individual snippet. There are both advantages and disadvantages of this new feature. One immediate advantage that I see is if your search result snippet has a breadcrumb, your website will probably get more pageviews because [...]

Continue reading How to add a breadcrumb to your blog and have it appear on Google’s Search Result Snippet

28 Sep, 2009

Remove html tags from a string

Posted in: Snippets

Java
String html_stripped = html.replaceAll("\\<.*?\\>", "");
PHP
strip_tags($html);
// built-in PHP function to strip HTML and PHP tags
Javascript
var html_stripped = html.replace(/(<.*?>)/ig,"");

Continue reading Remove html tags from a string

The main purpose of this code is to have “Read more” for a long block of text (eg: comments) without having to separate the text into two div blocks and then use toggle to show/hide the 2nd block. This code simply uses CSS overflow:hidden property to hide long block of text. jQuery live [...]

Continue reading Read more using jQuery live event

This example code shows you how you can have a top branding bar similiar to diggbar in just a few lines of html and css.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>framebar example by Web Development Blog</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
margin: 0;
padding: 40px 0 [...]

Continue reading Framebar (like diggbar) example in html and css with no javascript

I have been using reCAPTCHA a lot lately, but the default UI is not very intuitive nor pretty. Thanks to reCAPTCHA Wiki, I found out that you can customise the look and feel of reCAPTCHA using theme option. See below for my sample code.
<script type="text/javascript">
var [...]

Continue reading Customising reCAPTCHA Theme

Profile PicHello! Welcome to Web development blog! My name is Ei Sabai and on this blog, I write about web development, mobile app development, latest web technologies and the likes. Read more about me or have a look at some of the tips & resources I've written.
Subscribe to our newsletter to receive tips, resources and special offers related to web development & design.
We do NOT spam.
Your name:  
Your email:  

Tips & Resources

Tips & Resources
WordPress Web Hosting
Recommended web hosting providers for WordPress 3.0
iPhone Native App Development
Important steps into iPhone app development for beginners
iPhone Web App Development
Tips for iPhone web app development
Coupons for Web Developers
Get discounts on web hosting, domain names, templates, etc
10 Useful jQuery Snippets
Easy-to-use jQuery snippets for any website
HTML Email Newsletter
Step-by-step tutorial on how to code an HTML email newsletter
  • bluehost Hosting $6.95/month
  • Joomla Templates