Archive for February, 2010

Firebug: Tool website development

Tuesday, February 23rd, 2010

Firebug  is tool that i  have been using to creat tutorial and application in this blog, this tool is very helpful to development a website application that uses language-base javascript (extjs, ajax, jquery). Firebug have more functions to monitor a website, Like to know about css, html, and javascript a website. Below is a step by step how to use firebug

(more…)

Part 2: Application extjs using layout browser

Saturday, February 20th, 2010

This tutorial just only improve my previous tutorial about appliaction extjs, because in my previous tutorial there are errors or bugs. i create this application in extjs 2.1.0, and for along time, extjs team create a new version extsj, is ext-3.1.0. when i executed this application there more function does not work. But now the problem is clearly.

below are problem or error in first vertion.

1. Login: if you know about sql injection, you can login in, although you did know the password. Know i have been fixed it using this script.

$username = stripslashes(trim($_POST["username"]));
 $password = stripslashes(trim($_POST["password"]));
 $passwordhash = stripslashes(trim(md5($password)));
 $query = sprintf("select * from user where username='%s' and password='%s'",
mysql_real_escape_string($username ),mysql_real_escape_string($passwordhash ));

(more…)

Need Help: error captcha

Friday, February 19th, 2010

hi all, i have trouble which my previous tutorial “registration-form-with-captcha“  when i executed in hosting, but when i executed it in my localhost is it fine.  i deadlocked.  i need your help to get solving. my trouble is always wrong captcha when i execute my extjs apllication in hosting. please check my previous tutorial and try demo and check my source code.

i am very grateful if you could solve my problem.

thanks!

icone in button extjs

Thursday, February 11th, 2010

In this tutorial, I just want to give examples of how to use the icon on the button on extjs. I think this is a very simple example, and I’m sure has a lot to know about this. But there is nothing wrong if I write this tutorial, maybe there is not yet known. below is a sample script to create icon on button.

==script in javascript file==

buttons: [{
text:'Submit',
iconCls:'icon-close'

},{
text: 'Close',
iconCls:'icon-close',
handler: function(){
win.hide();
}
}]

“”"iconCls:’icon-close’,” is main of this tutorial. icon-close is name of class icon, and will  load  in html file,

this is a script html file

<STYLE type=”text/css”>
.icon-close
{
background-image:url(database_go.png) !important;
}
</STYLE>

demo

Registration form with captcha

Saturday, February 6th, 2010

Because of you, I still hold to share knowledge through this blog. These days I am confused what to write on this blog, I have no time to continue my project before. But do not worry, now I want to share knowledge, how to make a completed registration form with a captcha. As we know captcha is necessary to protect the blog or our website from spam.

Registration form is composed of 5 input, ie name, username, passwword, confirm password, email, and spam code. Below are some validation that I use to make this registration form:

  1. Each input can not be empty, sourcecode ==> “allowBlank: false”.
  2. username: user can only create a username at least 3 characters and maximum of 12 characters, source code ==> Minlength: 3, MaxLength: 12.
  3. password: sourcecode ==> inputType: ‘passoword’
  4. email validation : sourcecode ==> vtype: ‘email’.

To create spam on the extjs code I use script like below.

xtype:'box',
 autoEl:{
 tag:'img',
 src:'spam.php'
 }

You can download the sourcecode is in the link below.

download | demo