Friday, August 10, 2007

Few tips while using Ajax

While using Ajax in your application , dont assign

xmlHttpObject.onreadystatechange=null.

Because some browsers does not allow it.They neither show a warning nor an error. Especially IE does not support this case.

Instead replace that with
xmlHttpObject.onreadystatechange = function(){};

Similarly while using "POST" method in ajax, you need to specify some header
informations like Content-type,Content-length and Connection.

for example,

var postdata="your data that is to be submitted"
var url="http://www.test.com/servlet/testservlet";
xmlHttpObject.open("POST",url,true);
xmlHttpObject.onreadystatechange = function(){};
xmlHttpObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttpObject.setRequestHeader("Content-length", postdata.length);
xmlHttpObject.setRequestHeader("Connection", "close");
xmlHttpObject.send(postdata);

Tuesday, August 7, 2007

VACANCY FOR AN ELECTRICIAN IN INDIA!

Immediate requirement, No previous experience necessary.

All gear supplied, no overtime restrictions, pliers and screwdriver available at depot.

Salary: Your Wish (But only after completing the work)

Working hours: Till the job is done

Essential requirement - Fault Finding skills!

IMPORTANT: To get an idea of your first assignment see the below images!
















Sardarjiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

Sardar at a bar in New York .
Man on his right says "Johny Walker single"
Man on his left says "Peter Scotch single"
Sardar says - "Baljith Singh married"

***********************************************

Boss : am giving u job as a driver. STARTING salary Rs.2000/-, is it o.k
Sardar : U R great sir! Starting salary is o.k.......but??how much is DRIVING salary...?

***********************************************

Sardar's theory : Moon is more impt than Sun, coz it gives light atnight when light is needed & Sun gives light during the day when light is not needed!!!

***********************************************

2 sardars are driving a Car, one puts on the indicator and asks the other to check whether its working, he puts his head out and says YES...NO...YES...NO...YES...NO...

***********************************************

A Tamilian call up sardar and asks " tamil therima??"
Sardar got mad, angrily replied.... "Hindi tera baap!!!"

***********************************************

2 sardarjis looking at Egyptian mummy.
Sar 1 : Look so many bandages, pakka lorry accident case.
Sar 2 : Aaho, lorry number is also written...BC 1760!!!....

***********************************************

A sardar on an interview 4 da post detective.
Interviewer : who killed Gandhi?
Sardar : Thank u sir 4 giving me d job, I will start investigating.......

***********************************************

A sardar for an exam had studied only one essay 'FRIEND', but in theexam the essay which came was 'FATHER' . he replaced friend with fatherin the essay and it read: AM A VERY FATHERLY PERSON, I HAVE LOTS OF FATHERS,SOME OF MY FATHERS ARE MALE AND SOME ARE FEMALE. MY TRUEFATHER IS MY NEIGHBOUR.

***********************************************

Interviewar: what s ur qualification?
Sardarji : Sir I am Ph.d.
Interviewar : what do u mean by Ph.d?
Sardarji : (smiling) PASSED HIGHSCHOOL with DIFFICULTY....

***********************************************
Amitab : In which state Cauvery flows?
Sardar : liquid state.....
Audience clapped.. Amitab stunned, looks behind, ALL WERE SARDARS.......