Team:Warsaw/JSTest
From 2008.igem.org
(Difference between revisions)
Line 70: | Line 70: | ||
ans=req.responseText; | ans=req.responseText; | ||
ans=ans.substr(ans.search("<start>"),ans.search("<end>")-ans.search("<start>")); | ans=ans.substr(ans.search("<start>"),ans.search("<end>")-ans.search("<start>")); | ||
- | document.getElementById(day).innerHTML=trimContents(ans,title); | + | document.getElementById(day).innerHTML=trimStr(trimContents(ans,title)); |
} | } | ||
} | } | ||
Line 78: | Line 78: | ||
req.open('GET', adresbase+day, true); | req.open('GET', adresbase+day, true); | ||
req.send(null); | req.send(null); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
} | } | ||
function trimStr(str) | function trimStr(str) | ||
{ | { | ||
- | |||
return str.replace(/^\s+|\s+$/g, ''); | return str.replace(/^\s+|\s+$/g, ''); | ||
} | } |
Revision as of 17:39, 26 October 2008
|