Template:WarNotebook

From 2008.igem.org

(Difference between revisions)
Line 93: Line 93:
-
function ajaxsearch(url,phrase)
+
var eday="empty";
 +
eday=eday.replace("y","yday");
 +
 
 +
function next_fil(day)
{
{
 +
 +
var nday=nextday(day);
 +
 +
document.getElementById("next_ajax").innerHTML=document.getElementById("next_ajax").innerHTML+"<br>Call: "+day;
 +
if (window.XMLHttpRequest) { // Mozilla, Safari, Opera ...
if (window.XMLHttpRequest) { // Mozilla, Safari, Opera ...
   var req = new XMLHttpRequest();
   var req = new XMLHttpRequest();
Line 106: Line 114:
             if (req.status == 200) {
             if (req.status == 200) {
                 ans=req.responseText;
                 ans=req.responseText;
-
//alert(ans.search(phrase));
+
                if(ans.search(eday)>0) next_fil(nday);
 +
                else
 +
                {
 +
                document.getElementById("next_ajax").innerHTML=document.getElementById("next_ajax").innerHTML+"<br>Hit: "+nday;
 +
                }
             }
             }
}  
}  
Line 112: Line 124:
}; //koniec wewnętrznej funkcji
}; //koniec wewnętrznej funkcji
-
req.open('GET', url, true);
+
req.open('GET', adresbase+nday, true);
req.send(null);
req.send(null);
-
 
}
}
 +
next_fil(tokeny[tokeny.length-1].replace('/ /g','_'));
-
var phr="onstruct";
 
-
phr=phr.replace("on","con");
 
-
//ajaxsearch("https://2008.igem.org/Team:Warsaw/Calendar-Main/6_June_2008",phr);
 
-
var eday="empty";
 
-
eday=eday.replace("y","yday");
 
-
function next_fil(day)
+
function prev_fil(day)
{
{
-
var nday=nextday(day);
+
var pday=prevday(day);
-
document.getElementById("next_ajax").innerHTML=document.getElementById("next_ajax").innerHTML+"<br>Call: "+day;
+
document.getElementById("back_ajax").innerHTML=document.getElementById("back_ajax").innerHTML+"<br>Call: "+day;
if (window.XMLHttpRequest) { // Mozilla, Safari, Opera ...
if (window.XMLHttpRequest) { // Mozilla, Safari, Opera ...
Line 143: Line 150:
             if (req.status == 200) {
             if (req.status == 200) {
                 ans=req.responseText;
                 ans=req.responseText;
-
                 if(ans.search(eday)>0) next_fil(nday);
+
                 if(ans.search(eday)>0) next_fil(pday);
                 else
                 else
                 {
                 {
-
                 document.getElementById("next_ajax").innerHTML=document.getElementById("next_ajax").innerHTML+"<br>Hit: "+nday;
+
                 document.getElementById("back_ajax").innerHTML=document.getElementById("back_ajax").innerHTML+"<br>Hit: "+nday;
                 }
                 }
             }
             }
Line 153: Line 160:
}; //koniec wewnętrznej funkcji
}; //koniec wewnętrznej funkcji
-
req.open('GET', adresbase+nday, true);
+
req.open('GET', adresbase+pday, true);
req.send(null);
req.send(null);
}
}
-
next_fil(tokeny[tokeny.length-1].replace('/ /g','_'));
+
prev_fil(tokeny[tokeny.length-1].replace('/ /g','_'));
/* ]]> */</script>
/* ]]> */</script>
<br/>
<br/>
</html>
</html>

Revision as of 18:05, 9 October 2008

Gallery Bricks Notebook Team Project Home


Previous day