I am using ajax prototype.js. I have a input type="file" id="fileId" button.
var fileName = $("fileId").value gives the file name and not its contents.
How can I post the content of a file (selected from input type="file") to php script using Ajax.Updater or Ajax.Request?
You can’t do file uploads using AJAX like that. It’s a browser security feature.
However, you can use an iframe to simulate this behavior.
http://www.openjs.com/articles/ajax/ajax_file_upload/
This is not a file upload using AJAX, but it simulates the behavior.