I have suffered finding a code to easily upload file using ajax. Then I have found a Plugin which uses Jquery and PHP to upload file. I should not take the credit to make it. here is the link from where i got the code
This is free and very easy to use. And the code is really helpful. U can customize it in your own way.
Please thank him for this code. I am really greatful to the person who made this and gave that to us totally free.