well I have a button when Users Clicks it it got disable and fadeIn a Message Thanks We will take care of this soon but now What I want to do is when ever Users Clicks the button it will disable and then it will post to a php file (say: error.php) this error.php will be like this
<?php
if(isset($_POST['submit'])){
$ip= $_SERVER['REMOTE_ADDR'];
$page= $_SERVER['REQUEST_URI'];
// now update these to sql database ..... and if successfully posted return true
}
else{
return false;
}
now if jQuery gets True it will fadeIn a div with sucess message else it will fade in another div with error / sorry message
the html and JS looks like this
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("#submit").click(function(){
$('#submit').attr('disabled',true);
$("#div1").fadeIn(1000); //if success
$("#div2").fadeIn(1000); //if error
});
});
</script>
</head>
<body>
<div id="div1" style="display:none;">Success</div>
<div id="div2" style="display:none;">Error</div>
<button id="submit">report The Page</button>
</body>
</html>
please help thnx