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 ajaxsearch(url,phrase) | function ajaxsearch(url,phrase) | ||
{ | { | ||
- | var | + | if (window.XMLHttpRequest) { // Mozilla, Safari, Opera ... |
- | if ( | + | var req = new XMLHttpRequest(); |
+ | } else if (window.ActiveXObject) { // IE | ||
+ | var req = new ActiveXObject("Microsoft.XMLHTTP"); | ||
+ | } | ||
+ | var ans; | ||
+ | req.overrideMimeType('text/xml'); | ||
+ | req.onreadystatechange = function() { //początek wewnętrznej funkcji | ||
+ | if (http_request.readyState == 4) { | ||
+ | if (http_request.status == 200) { | ||
+ | ans=req.responseText; | ||
+ | alert(ans.search(phrase)); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | }; //koniec wewnętrznej funkcji | ||
+ | |||
+ | req.open('GET', url, true); | ||
+ | req.send(null); | ||
- | |||
- | |||
- | |||
- | |||
} | } | ||
Line 120: | Line 120: | ||
var phr="onstuct"; | var phr="onstuct"; | ||
phr=phr.replace("on","con"); | phr=phr.replace("on","con"); | ||
- | + | ajaxsearch("https://2008.igem.org/Team:Warsaw/Calendar-Main/6_June_2008",phr); | |
/* ]]> */</script> | /* ]]> */</script> | ||
<br/> | <br/> | ||
</html> | </html> |
Revision as of 17:42, 9 October 2008
|