
Untitled
By: a guest on
May 2nd, 2012 | syntax:
HTML | size: 1.16 KB | hits: 20 | expires: Never
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="application/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a").click(function() {
var check = $(this).attr("id");
send(check);
});
});
function check(value) {
if (value == start) {
setInterval(send(), 2000);
} else {
alert ("Process is stopped or is already stopped");
}
};
function send() {
var sitetocheck = $("#site").val();
$.ajax({
type: "POST",
url: "/js/domain_post.php",
data: { site: sitetocheck }
}).done(function( msg ) {
$("#wrapper").append("Send data to server");
});
};
</script>
</head>
<body>
<div id="wrapper">
<input id="site" type="text" /><br />
<a id="start">START</a><br />
<a id="stop">STOP</a>
</div>
</body>
</html>