Template:WarNotebook
From 2008.igem.org
(Difference between revisions)
Line 93: | Line 93: | ||
- | + | 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; | ||
- | + | 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', | + | req.open('GET', adresbase+nday, true); |
req.send(null); | req.send(null); | ||
- | |||
} | } | ||
+ | next_fil(tokeny[tokeny.length-1].replace('/ /g','_')); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | function | + | function prev_fil(day) |
{ | { | ||
- | var | + | var pday=prevday(day); |
- | document.getElementById(" | + | 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( | + | if(ans.search(eday)>0) next_fil(pday); |
else | else | ||
{ | { | ||
- | document.getElementById(" | + | 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+ | + | req.open('GET', adresbase+pday, true); |
req.send(null); | req.send(null); | ||
} | } | ||
- | + | prev_fil(tokeny[tokeny.length-1].replace('/ /g','_')); | |
/* ]]> */</script> | /* ]]> */</script> | ||
<br/> | <br/> | ||
</html> | </html> |
Revision as of 18:05, 9 October 2008
|