// create a function
function clearConsole(){if(window.console ||window.console.firebug){
console.clear(); // clear the console
}}
jQuery.ajax({
type:"GET",// can be GET OR POST
url: urlx,
cache:false,
error:function(){alert('error try again!!'); // show error or whatever
clearConsole();// call the function
},
success:function(html){
clearConsole();
//--- you code----
}}});
as you can see the function has been called on error as well as on success, since you would need to hide the call even when there is an error.
Creating a function would make it easy for you to comments the things at the time of development. Try At Js Fiddle
Alright.. so we all are aware of the browser compatibility issues. Specially when it come to any of those Internet explorers. Most of the times I have faced issues that a website works perfectly in in IE8 but not in IE9 which is weird.
Her is a small trick to enable back word compatibility from IE9 to IE7.
<!-- if you want ie8 to work as ie7, you ca replace the versions as per you needs. -->
<!--[if IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<![endif]-->
<!--if you want to enforce ie9 to be as ie8-->
<!--[if IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
<![endif]-->
This is my first post at my friend Harpreet’s Blog, so i thought about writing about any common interests between me and him, may be about open source, may be about revolutions, but then i watched this GREAT speech on Youtube, and i instantly took the decision to make this speech my first post in his blog, may it be a message heard by all human beings!
We all know Charlie Chaplin, the COMEDIAN, who has always made us laugh so hard even without saying a thing, his face expressions were enough.
I never thought that such a touching-speech can be well told by a comedian, NEVER!
So, i’ll leave you with the speech, and the subtitles are below the video here in the post.
I almost forgot! the video has 2 copies, one copy just ripped off the movie “The Great Dictator” where you can see his AMAZING facial expressions, and the other copy which is a fan-made video with images & videos relating the topics in the speech to our lives.
The movie copy
The fan-made copy
The Subtitles
I’m sorry, but I don’t want to be an emperor. That’s not my business. I don’t want to rule or conquer anyone. I should like to help everyone if possible; Jew, Gentile, black man, white.
We all want to help one another. Human beings are like that. We want to live by each other’s happiness, not by each other’s misery. We don’t want to hate and despise one another. In this world there is room for everyone, and the good earth is rich and can provide for everyone. The way of life can be free and beautiful, but we have lost the way.
Greed has poisoned men’s souls, has barricaded the world with hate, has goose-stepped us into misery and bloodshed. We have developed speed, but we have shut ourselves in. Machinery that gives abundance has left us in want. Our knowledge has made us cynical; our cleverness, hard and unkind.
We think too much and feel too little. More than machinery, we need humanity. More than cleverness, we need kindness and gentleness.
Without these qualities, life will be violent and all will be lost.
The airplane and the radio have brought us closer together. The very nature of these inventions cries out for the goodness in men; cries out for universal brotherhood; for the unity of us all.
Even now my voice is reaching millions throughout the world, millions of despairing men, women, and little children, victims of a system that makes men torture and imprison innocent people.
To those who can hear me, I say, do not despair. The misery that is now upon us is but the passing of greed, the bitterness of men who fear the way of human progress. The hate of men will pass, and dictators die, and the power they took from the people will return to the people.
And so long as men die, liberty will never perish.
Soldiers! Don’t give yourselves to brutes, men who despise you, enslave you; who regiment your lives, tell you what to do, what to think and what to feel! Who drill you, diet you, treat you like cattle, use you as cannon fodder.
Don’t give yourselves to these unnatural men – machine men with machine minds and machine hearts! You are not machines, you are not cattle, you are men!
You have the love of humanity in your hearts! You don’t hate! Only the unloved hate; the unloved and the unnatural.
Soldiers! Don’t fight for slavery! Fight for liberty!
In the seventeenth chapter of St. Luke, it is written that the kingdom of God is within man, not one man nor a group of men, but in all men! In you!
You, the people, have the power, the power to create machines, the power to create happiness!
You, the people, have the power to make this life free and beautiful, to make this life a wonderful adventure.
Then in the name of democracy, let us use that power. Let us all unite.
Let us fight for a new world, a decent world that will give men a chance to work, that will give youth a future and old age a security.
By the promise of these things, brutes have risen to power. But they lie! They do not fulfill that promise. They never will!
Dictators free themselves but they enslave the people.
Now let us fight to fulfill that promise. Let us fight to free the world! To do away with national barriers! To do away with greed, with hate and intolerance! Let us fight for a world of reason, a world where science and progress will lead to all men’s happiness.
Soldiers, in the name of democracy, let us all unite!
Hello everyone. After a long time i posting this new tutorial. I created it for my friend who needed this auto suggest feature. This is a simple feature that can be used when u need to type city, so you can suggest previously saved cities.
Even can be used where you need to put suggestion for search keywords, names, places etc.
Hello everyone. Its been a long time i haven’t poted. I was busy with my career and finally opened my own firm named SparkIgniter. Its going great till now. This blog will always continue to run.
Ok so here is a small code i created for a friend of mine who is a java developer.
Scenario: He wanted the panels to from left to right. On right it had main categories, then the sub-categories and on most right the products.
When we click on the category another panel slides down on the right with the matching sub categories. As we click on the sub-category another panel drops down with the final products.
Hello there people, Its been a long time I have not posted anything.
Did you ever thought of why to create thumbnail and saving them to server, or even you databases. keeping you mind throuh the complete script that uploads and then generates a thumbnail, Then you save the path to database.. aaaah… Well i was tired. after searching internet i got a script.. Thank god.
Ok here is the script that i have been using for a while now. The best part is, that it created an image in buffer only. I mean it does not save an image to a folder. its just resizes your image temporarily where as you actual image remains same.
Hey to all my CodeIgniter friends. SO you all have been waiting for a Gmail and Facebook like chat to be implemented in Codeigniter.
NOW WITH VIDEO TUTORIAL AND FULLY INTEGRATED DOWNLOADS SCRIPTS
Its been so long, after switching from windows to Ubuntu.Things are more easy, attractive ans secure.
This Tutorial is for creating a FACEBOOK LINK LINK SHARING INTERFACE.
The script used php, javascript expressions, jquery and some css too. Continue reading →