I am currently working on a form that includes a textbox and a button for submitting data using ajax.
<input type="password" id="password" />
<button id="addaccount" onclick="showload();">Add</button>
When the user clicks on the button, the showload() function is triggered to display a loading animation on the screen with a semi-transparent white background and a spinning .gif in the center.
I now need help figuring out how to reset the password textbox using JavaScript.
$(document).ready(function(){
$("#addaccount").click(function(){
var password = $("#password").val();
$.ajax({
method: "POST",
url: "auth_adduser.php",
data: {
password:password
},
success: function(data){
$("#successresult").html(data);
}
});
});
});
Any suggestions or guidance would be greatly appreciated. Thank you!