skip to Main Content

Jquery ajax hide element on success request

I am trying to hide a button that i clicked on to upload a image after succesfull upload. this is my code: $(document).on('click', '.upload-image-click', function() { var token = $('input[name="csr"]').attr('value'); var formData = new FormData(); formData.append('image_file', $(this).siblings('input[name=image_file]')[0].files[0]); $.ajax({ url: '/image-upload-ajax/',…

VIEW QUESTION

Checking file size limit – Jquery ajax

i need help in checking file size before uploading file, i want to check the size of file and then continue to upload $("form#data").submit(function(e) { e.preventDefault(); if(this.files[0].size > 2097152){ alert("File is too big!"); this.value = ""; return false; }; var…

VIEW QUESTION

how to filter json data for different key value and creating a new json element using that key values without hard coding data – Jquery ajax

<table> <tr> <th>Net Weight</th> <th>Net Weight Count</th> <th>Difference Average</th> </tr> <tr> <td>5</td> <td>20</td> <td>120</td> </tr> <tr> <td>3</td> <td>3</td> <td>30</td> </tr> <tr> <td>52</td> <td>1</td> <td>123</td> </tr> </table> I have a json data in which i want to filter these data according…

VIEW QUESTION
Back To Top
Search