I'm trying to write simple function for adding picture with AJAX use.
Unfortunatelly I don't know how to handle <input type="FILE" id="file"/>
What I need is to get all file information in to JS script and send it to php script to load the file. Does any body have script that could show how the FILE is handle by JAVASCRIPT ?
PS. I'm not looking for ready AJAX class like JQueary..
Ps2. I'm also sending some comment information in this function...
1.get info from input FILE to the javascript function
2. Send HTTPRequesto to uploadfile.php ( I know how to send information via GET like text,... ect..)
3. Use php script and send it back to page.
I dont want to reload web site... just use AJAX. The problem is that I dont know how JS is handling file input from HTML and how I can send this input from JS to PHP.
AFAIK you cannot use the file control with javacript. You can post to an iframe by using the target attribute for the form element and then attach an onload handler to the iframe. Alternatively, you can use a flash, silverlight, or java object to upload the file.
Bookmarks