Display Twitter Status in Your Website Using Savvy.UI

Posted on the September 5th, 2008 under JavaScript, Programming, Savvy.UI, Tutorial by admin

This tutorial is a continuation of my previous tutorial Display Random Text in Your Website Using Savvy.UI but instead of random text this time we will display your latest Twitter Status. The tutorial is based on the Twitter Badge for HTML.

Display Random Text in Your Website Using Savvy.UI

Posted on the September 4th, 2008 under JavaScript, Programming, Savvy.UI, Tutorial by admin

What your opinion to the random text appearing at the upper right corner of this blog? Would like to have one too? Savvy.UI JavaScript Library has made it easy for you to display message or note without interfering the user view of the application using Js.widget.message object.

Savvy.UI 1.0.0 Pre-release — A pre-release of all new Savvy.UI JavaScript Library is now available for download at http://savvyui.googlecode.com, trunk version is also available via SVN. September 4, 2008 No Comments

Google Chrome — Google finally release it's own web browser "Google Chrome" based on Webkit and V8 JavaScript Engine, you can now download the application (for Windows XP/Vista), as for Mac and Linux do checkout their Developer Documentation page. September 3, 2008 No Comments

Hide E-mail Address From Spammer in HTML

Posted on the September 2nd, 2008 under JavaScript, Programming, Savvy.UI, Tutorial by admin

There’re multiple way to hide E-mail Address in your HTML page from being fetch/grab by spammer, today let me show you one way of doing it using simple JavaScript and Savvy.UI JavaScript Library.

Email me to <span class="mailto"></span>

Here’s an example how you can transform all span.mailto to display and link an e-mail.

Js.simplify();
var email = ["zaki","codenitive.com"].join("@"); // just edit this line;
 
$(document).ready(function() {
	$("span.mailto").each(function() {
		$(this).add("a", {
			href: "mailto:" + email,
			title: "Email to " + email
		}).text(email);
	});
});

Js.simplify — Enable $() in Savvy.UI JavaScript Library is now 1 line away, just write Js.simplify() and your done. September 2, 2008 No Comments

Contact Me — I just finish developing a custom Contact Form for this blog, if you need to reach me please do so using at the Contact page. August 29, 2008 No Comments

links for 2008-08-28 — My daily posted bookmark from del.icio.us August 28, 2008 No Comments

Copying JavaScript Object Without Adding Reference

Posted on the August 28th, 2008 under Guide, JavaScript, Programming, Q&A, Savvy.UI by admin

Question

How to copy a JavaScript Object without adding the reference to the object it copy from? For example:

var user = {
	name: "Mior Muhammad Zaki",
	age: 25
};
var programmer = user;
programmer.language = ["PHP", "MySQL", "JavaScript"];
alert(user.language);
// return ["PHP", "MySQL", "JavaScript"] (when expect undefined)

Combining Multiple Table Columns in MySQL

Posted on the August 25th, 2008 under Guide, MySQL, Programming, Q&A, Tutorial by admin

Question

How to combine address1, address2, address3 and address4 in the following table to a single column such as address?

CREATE TABLE user (
`id` INT NOT NULL AUTO_INCREMENT ,
`name` VARCHAR( 255 ) NOT NULL ,
`email` VARCHAR( 255 ) NOT NULL ,
`address1` VARCHAR( 100 ) NOT NULL ,
`address2` VARCHAR( 100 ) NOT NULL ,
`address3` VARCHAR( 100 ) NOT NULL ,
`address4` VARCHAR( 100 ) NOT NULL ,
`postcode` VARCHAR( 6 ) NOT NULL ,
`state` VARCHAR( 100 ) NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM;