How to upload file using Ajax and Rails

Javascript, jQuery, Ruby, Ruby on Rails, 2016-02-12 10:58:00 UTC
In this case, we need a plugin    <form id="the_form" action="/page/gambars/form_upload" method="post" enctype="multipart/form-data"> <div> File<br /> <input name="gambar[gambar_name]" /> </div> <div> <button type="submi

Aborting previous ajax request

jQuery, 2016-01-15 22:17:14 UTC
Aborting previous ajax request often occure when creating an autocomplete search box. In other case, occure when you want to cancel uploading a file to the server. I wan to show you how to do that. First, let see what is ajax do when you fire an ajax; var lol = $.ajax({     url: '/api/v

Single page application using jQuery

Javascript, jQuery, 2015-06-17 00:06:39 UTC
Sometimes you see the URL format like this;!/the_page. Usually, this is the Angular application. This is good technique to load the page faster than a standard technique. In this tutorial, I want to show you how to create it and this technique is just using jQuery. Let's take a