Friday, December 3, 2010

Thursday, December 2, 2010

Tuesday, October 5, 2010

validation for number in java script



function data_change(field)
{
var check = true;
var value = field.value; //get characters
//check that all characters are digits, ., -, or ""
for(var i=0;i < new_key =" value.charAt(i);"> "9")) &&
!(new_key == ""))
{
check = false;
break;
}
}
//apply appropriate colour based on value
if(!check)
{
field.style.backgroundColor = "red";
}
else
{
field.style.backgroundColor = "white";
}
}

Friday, August 20, 2010

how to change readonly true to false in javascript

if you want change Attributes in javascript like if you textbox now readonly
but when you click on button you textbox should be readonly false it very easy

just type this code :-

document.getElementById("ta").readOnly = true;


here ta is textbox id

Tuesday, August 10, 2010

HOW TO CAST BOOLEAN TO STRING IN JAVA PROGRAMMING

It is simple just create class from Boolean1 and write this code and save .java extention and run it.

public class Boolean1{
public static void main(String[] args){
boolean b = true;
String s = new Boolean(b).toString();
System.out.println("String is:"+ s);
}
}

Thursday, July 8, 2010

how to install pg_admin3 on debian

you can install easy postgres Sql on debian
just go on terminal and search postgres version
by following command

#aptitude search pgadmin
And select version
then run follow command

# aptitude install pgadmin3

and press enter

How to install mysql on debian

if you want to install mysql on debian linux so following this step.

step 1. open terminal and run following command

first search mysql on terminal by command

#aptitude search mysql

and select following link

#mysql-admin
#mysql-client-5.0
#mysql-server-5.0
#mysql-query-browser

after select run this command

#aptitude install
mysql-admin mysql-client-5.0 mysql-server-5.0 mysql-query-browser

and press enter

How to sort an HashMap based on value

import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.LinkedHashMap; import java....