This commit is contained in:
Kasper Rynning-Tønnesen
2014-08-08 18:29:44 +02:00
parent 31dbbf01e3
commit a4cce13a58

View File

@@ -70,7 +70,7 @@ if(isset($_GET['v'])){
function onytplayerStateChange(newState) { function onytplayerStateChange(newState) {
if(newState == 0) if(newState == 0)
{ {
/*$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "save.php", url: "save.php",
data: "thisUrl="+response, data: "thisUrl="+response,
@@ -79,21 +79,7 @@ if(isset($_GET['v'])){
console.log("saved"); console.log("saved");
console.log(response); console.log(response);
} }
});*/ });
$.ajax({
type : 'post',
//dataType : '', // http://en.wikipedia.org/wiki/JSON
url : 'save.php',
data : "thisUrl="+response,
success: function(ans) {
if( ans.type == 'success' ) {
alert('Bravo! ' + ans.result);
} else {
alert('Error!');
};
}
});
setTimeout(function(){ setTimeout(function(){
response = $.ajax({ type: "GET", response = $.ajax({ type: "GET",