Template:WarNotebook

From 2008.igem.org

(Difference between revisions)
Line 84: Line 84:
document.getElementById("next").href=adresbase+nextday(tokeny[tokeny.length-1].replace('/ /g','_'));
document.getElementById("next").href=adresbase+nextday(tokeny[tokeny.length-1].replace('/ /g','_'));
document.getElementById("back").href=adresbase+prevday(tokeny[tokeny.length-1].replace('/ /g','_'));
document.getElementById("back").href=adresbase+prevday(tokeny[tokeny.length-1].replace('/ /g','_'));
-
alert(tokeny[tokeny.length-1].replace('/ /g','_'));
+
alert(tokeny[tokeny.length-1].replace("/ /g","_"));
-
function next_full_day(day)
 
-
{
 
-
var fday=nextday(day);
 
-
document.getElementById("next_ajax").innerHTML=document.getElementById("next_ajax").innerHTML+'<br/>Day: '+day;
 
-
var req = new XMLHttpRequest();
 
-
req.open('GET', adresbase+fday, true);
 
-
req.onreadystatechange = function (aEvt) {
 
-
  if (req.readyState == 4) {
 
-
    if(req.status == 200)
 
-
{     
 
-
var response=req.responseText;
 
-
var stat=response.search("this_is_empty_day");
 
-
if(stat<1)
 
-
{
 
-
document.getElementById("next_ajax").innerHTML=document.getElementById("next_ajax").innerHTML+'<br/>Next filled day: '+fday;
 
-
return fday;
 
-
//alert(fday);
 
-
}
 
-
else next_full_day(fday);
 
-
}   
 
-
else
 
-
      dump("Błąd podczas ładowania strony\n");
 
-
  }
 
-
};
 
-
req.send(null);
 
-
 
-
}
 
-
 
-
 
-
function prev_full_day(day)
 
-
{
 
-
var fday=prevday(day);
 
-
document.getElementById("back_ajax").innerHTML=document.getElementById("back_ajax").innerHTML+'<br/>Day: '+fday;
 
-
var req = new XMLHttpRequest();
 
-
req.open('GET', adresbase+fday, true);
 
-
 
-
 
-
 
-
}
 
-
 
-
 
-
 
-
next_full_day("5_July_2008");
 
/* ]]> */</script>
/* ]]> */</script>
<br/>
<br/>
</html>
</html>

Revision as of 17:02, 9 October 2008

Gallery Bricks Notebook Team Project Home


Previous day