Heh i didn’t mean you.

Deaton: So it blocks rendering

Moneaux: Cork: How do I remove the first element ?

Tademy: Donno the fiddle doesn’t render

Bracher: So no clue what is on it

Henriksen: Cork: http://jsfiddle.net/Varun_Krishna/2yw1et4u/5/

Dinovo: Is that the best way to do ?

Tomerlin: Question: is it possible to send and file to a php script using ajax. $file = $’#fileToUpload’.files0; and then send $file as data?

Bankert: Sweet2k4: check mdn formData

Simoson: Varun_Krishna: still doesn’t render

Yow: Cork: http://jsfiddle.net/Varun_Krishna/2yw1et4u/7/

Niedzwiedz: Cork: so it needs to be a formData to send a file?

Mcartor: Sweet2k4: yes, formData was explicitly added to allow sending files over ajax

Newsam: Cork: alright then it makes sens

Richmann: Cork: is it possible to send a formData with the image and also varibles that is not included in the form data?

Mutter: Varun_Krishna: this is what i get http://i.imgur.com/og6Y3oY.png

Kirberger: So again, no clue until you fix the broken css

Phoeuk: Just use the append method

Scantlebury: Sweet2k4: you can add any data you have to formData

Kontos: Even a Blob or BinaryArray

Cabeza: Alright, good to know

Heatherly: Cork: I am sorry about that.

Ringham: Cork: one more thing: how do i get the file from the input into the fromData?$image = $’#input-upload’.files0; formdata.append”image”, $image; does not work

Magnano: Sweet2k4: formdata.append’image’, $’#input-upload’0.file0;

Pharao: 0 is needed after $ to get access to the raw dom object

Pennisi: Sweet2k4: this should also work: formdata.append’image’, $’#input-upload’.prop’files’0;

Zillmer: I missed the s in files in the first example

Saranzak: Cork: oh, alright il try that

Niederhauser: Cork: TypeError: ‘append’ called on an object that does not implement interface FormData. could it be that im using an old version of jquery?

Hartson: Sweet2k4: no, formdata is a browser native

Meusel: So you do var formdata = new FormData;

Dickirson: Formdata = new FormData; or var formdata = new FormData;?

Sista: Unless you’ve already defined the variable

Daughrity: Else the variable becomes a global

Laudat: Yeah i had var when the error occured.

Ramin: In this example they use a global var in the case: http://webkul.com/blog/send-images-through-ajax/

Connick: Most likely by mistake

Coward: On the other hand, that is at the top level anyway

Schomas: So it is a global what ever they do

Toca: Ok, well the error refers to the jquery.min.js file

Kiili: Ah, right $.ajax expects to get an object or a string

Moscato: You need to disable parsing

Delille: Oh, how do i do that? do you have any docs?

Gollihar: Or could i use jQuery.ajax instead? or is it the same thing

Peria: Sweet2k4: processData and contentType = false in the $.ajax obptions

Messmore: Cork: great now it works!, i left those out since i didnt know what they did. thank you very much!

Lessner: Sweet2k4: i recommend reading api.jquery.com/jquery.ajax

Duberstein: Cork: il do that, thanks for advice

Calowell: Actually i recommend reading api.jquery.com, period :

Poties: Hehe, if i had 2 lifetimes over for reading ;

Firenze: It isn’t that much to read

Rickon: I hvnt checked tbh, but maybe a good nighttime p***ing

Slinkard: Heh i didn’t mean you should read it from back to end