From d3f5f911c4c0b6d59af548728e43dbc0748dbc2a Mon Sep 17 00:00:00 2001 From: Nicolas Rannou Date: Fri, 2 Dec 2011 09:21:18 -0500 Subject: [PATCH] WIP: working! --- js/ajax.js | 53 ----------------------------------------------------- upload.php | 2 +- 2 files changed, 1 insertion(+), 54 deletions(-) diff --git a/js/ajax.js b/js/ajax.js index 07186bc..df8287d 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -50,32 +50,8 @@ function UpdateCurrentImage(filename) xmlHttp.send(null); } -function RequestImage(filename) -{ - var xmlHttp = getXMLHttp(); - - xmlHttp.onreadystatechange = function() - { - if(xmlHttp.readyState == 4) - { - HandleResponse(xmlHttp.responseText, filename); - } - } - - xmlHttp.open("GET", "ajax.php?var1=value1&var2=value2", true); - xmlHttp.send(null); -} - function HandleUpdateCurrentImage(response, filename) { - //document.getElementById('preview').innerHTML = ag.concat("/>\""); - //document.getElementById('ajaxecho').innerHTML = response; -} - -function HandleResponse(response, filename) -{ - //document.getElementById('preview').innerHTML = ag.concat("/>\""); - document.getElementById('filtered').innerHTML = response; } function UpdateImageIfAny() @@ -101,15 +77,12 @@ function RequestUpdateImageIfAny() function HandleResponseUpdateImageIfAny(response) { - //document.getElementById('preview').innerHTML = ag.concat("/>\""); - //document.getElementById('ajaxecho').innerHTML = response; var im = ""); } function openFile(file) { - //document.getElementById('preview').innerHTML = ""; var im = ""); @@ -117,7 +90,6 @@ function openFile(file) { } function testCommand(file) { - //document.getElementById('ajaxecho').innerHTML = file; UpdateTestCommand(file); } @@ -142,9 +114,6 @@ function UpdateTestCommand(file) function HandleResponseUpdateTestCommand(response) { - //document.getElementById('preview').innerHTML = ag.concat("/>\""); - //document.getElementById('ajaxecho').innerHTML = response; - document.getElementById('ajaxecho').innerHTML = response; images = response.split(" "); @@ -153,26 +122,4 @@ function HandleResponseUpdateTestCommand(response) var im = ""); -} - -function preview(file) { - var getvalue=document.getElementById("myimage").getAttribute("value"); - - document.getElementById('filtered').innerHTML = file; - //RequestImage(); - // get image name - // get filter - // server process - // server sends new image location -} - -function clicked() { - var getvalue=document.getElementById("command").getAttribute("value"); - - //document.getElementById('ajaxecho').innerHTML = getvalue; - //RequestImage(); - // get image name - // get filter - // server process - // server sends new image location } \ No newline at end of file diff --git a/upload.php b/upload.php index 3385a0f..b1c815e 100644 --- a/upload.php +++ b/upload.php @@ -1,6 +1,6 @@