Template:WarNotebook
From 2008.igem.org
(Difference between revisions)
Line 90: | Line 90: | ||
document.getElementById("back").href=adresbase+prevday(tokeny[tokeny.length-1].replace('/ /g','_')); | document.getElementById("back").href=adresbase+prevday(tokeny[tokeny.length-1].replace('/ /g','_')); | ||
+ | function getFile(url) { | ||
+ | if (window.XMLHttpRequest) { | ||
+ | AJAX=new XMLHttpRequest(); | ||
+ | } else { | ||
+ | AJAX=new ActiveXObject("Microsoft.XMLHTTP"); | ||
+ | } | ||
+ | if (AJAX) { | ||
+ | AJAX.open("GET", url, false); | ||
+ | AJAX.send(null); | ||
+ | return AJAX.responseText; | ||
+ | } else { | ||
+ | return false; | ||
+ | } | ||
+ | } | ||
+ | function ajaxsearch(url,phrase) | ||
+ | { | ||
+ | var fil=getfile(url); | ||
+ | if (!fil) return false; | ||
+ | var result=fil.search(phrase); | ||
+ | if (result>0) return true; | ||
+ | else return false; | ||
+ | } | ||
+ | |||
+ | alert(ajaxsearch("https://2008.igem.org/Team:Warsaw/Calendar-Main/6_June_2008","construct")); | ||
/* ]]> */</script> | /* ]]> */</script> | ||
<br/> | <br/> | ||
</html> | </html> |
Revision as of 17:13, 9 October 2008
|