Permalink
Browse files

JS test

  • Loading branch information...
1 parent f6f5662 commit 6b90701a1d6489fab89a590d094c1007fb2a1e29 @hroncok hroncok committed Oct 4, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 php/js.js
View
8 php/js.js
@@ -42,19 +42,15 @@ function dwnLink(job) {
textfile.onreadystatechange=function() {
if (textfile.readyState==4 && textfile.status == 200){
var linkHTML = "<strong>Download:</strong> <a href=\"files/"+job+"_export.gcode\">"+job+"_export.gcode</a> &mdash; Your files will be deleted in 24 hours.";
- document.getElementById("topDwnLink").innerHTML=linkHTML;
- document.getElementById("bottomDwnLink").innerHTML=linkHTML;
- clearInterval(dwnInterval);
- clearInterval(refreshInterval);
- } /*else {
+ } else {
linkHTML = "<strong>Error:</strong> The procces ended without gcode, see the log";
}
if (linkHTML!="") {
document.getElementById("topDwnLink").innerHTML=linkHTML;
document.getElementById("bottomDwnLink").innerHTML=linkHTML;
clearInterval(dwnInterval);
clearInterval(refreshInterval);
- }*/
+ }
}
textfile.open("HEAD","files/"+job+"_export.gcode",true);
textfile.send();

0 comments on commit 6b90701

Please sign in to comment.