Monthly Archives: September 2010

Archive

Formatting date in a php smarty template

The date string can be formatted in a smarty template like this:

$payment.creation_date|date_format:"%d-%m-%Y"

where creation_date is an element of $payment array.

Category: PHP | Tags:

New features in Gmail

New features in GmailGmail new look at a glance

(I should have had it posted about 15-20 days ago but could not post due to break from office for some other personal stuff. Posting it as it is now (although it is not a complete list of new features in new look and feel of gmail))

Gmail presented a whole new ‘clean’ look yesterday(that day). Here are few things i noticed at a cursory look and thus liked (merely unliked anything) many of them. I hope you also like them. Continue reading

An advanced HTML to PDF conversion using ezpdf php class

Posting a link to the working example of HTML Form to PDF using “ezpdf” php class. I added some code to this class in order to create more advanced HTML tables cells with borders as shown in the output PDF document. Continue reading

jQuery way to limit input characters using javascript substring function

It’s an example of useful jQuery way to limit user entering a maximum set number of character in your input fields. Example makes use of javascript substring function to limit user upto 20 character which is triggered on keyup event. It truncate anything extra to that limit.

$("input[name=Title]").keyup(function(){
		var text = $(this).val();
		if(text.length > 20) {
			text = text.substring(0, 20);
			$(this).val(text);
		}
	})
Category: Javascript, jQuery