Skip to content

Author: admin@master

Aren’t promises just callbacks?

I’ve been developing JavaScript for a few years and I don’t understand the fuss about promises at all. It seems like all I do is change: Which I could use a library like async for anyway, with something like: Which is more code and less readable. I didn’t gain anything here, it’s not s…

FormData is empty when using jQuery ajax()

I try to submit form with file with jQuery.ajax. Google says I should use FormData which will automagically encode the file and all inputs into the one object which I can send via XHR. Well, the FormData object is empty. It’s empty in the debugger and on the server side. I can’t find the error. He…

Can’t stop setInterval with clearInterval

Been playing with this in a fiddle for 4 hours now and cant find a solution… HTML: js: Note: because clearInterval is not working you need to click on “run” in the jsfiddle to get it to stop after clicking the checkbox, you have 7 seconds between alerts… Here is a link to the jsfiddle:…