PHP Classes

File: js/edit_user.js

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Simple REST API   js/edit_user.js   Download  
File: js/edit_user.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Simple REST API
Example of REST API using the MVC design pattern
Author: By
Last change:
Date: 2 months ago
Size: 667 bytes
 

Contents

Class file image Download
$(document).ready(function () { $("form").submit(function (e) { e.preventDefault(); $.ajax({ type: "POST", url: "api/edituser-api.php", data: $(this).serialize(), success: function (response) { if (response[0].message == "User Updated") { $("#username").val(response[0].username).hide().fadeIn(); $("#first").val(response[0].firstname).hide().fadeIn(); $("#last").val(response[0].lastname).hide().fadeIn(); } console.log(response); } }); }); });