I have been trying to add a alert to my button which updates a users details in a database.
I have tried adding a onclick method directly to the button and using functions but it doesn;t seem to work.
My button is;
<input type="submit" id="profileclick" value="Update" class="button-link"/>
And I am submitting the form by: (if it is important)
<form id="profile" method="post" action="../script/updateUserDetails.php">
One of the ways I tried was
$('#profileclick').click(function(){
alert('Your details have been updated');
$('#profile').submit();
});
In all instances the details update but I do not receive a alert.