Team:Warsaw/JSTest

From 2008.igem.org

(Difference between revisions)
Line 1: Line 1:
{{WarHead}}
{{WarHead}}
<html>
<html>
-
dsada
+
 
-
<div id="html" style="display:none;"></div>
+
<div id="html"></div>
<div id="progress"></div>
<div id="progress"></div>
<div id="result"></div>
<div id="result"></div>
-
sdad
+
 
<script type="text/javascript">
<script type="text/javascript">
Line 33: Line 33:
}
}
-
var authors=['Michał K.','Piotr','Antoni','Michał L.','Paweł'];
+
function getQuerystring(key, default_)
-
 
+
-
var adresbase='https://2008.igem.org/Team:Warsaw/Calendar-Main/';
+
-
 
+
-
var eday="empty";
+
-
eday=eday.replace("y","yday");
+
-
 
+
-
function dom(nday)
+
{
{
-
 
+
  if (default_==null) default_="";
-
 
+
  key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
-
document.getElementById("progress").innerHTML="Processing: "+nday;
+
  var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
-
 
+
  var qs = regex.exec(window.location.href);
-
if (window.XMLHttpRequest) { // Mozilla, Safari, Opera ...
+
  if(qs == null)
-
  var req = new XMLHttpRequest();
+
    return default_;
-
} else if (window.ActiveXObject) { // IE
+
  else
-
  var req = new ActiveXObject("Microsoft.XMLHTTP");
+
    return qs[1];
-
}
+
-
var ans;
+
-
if (window.overrideMimeType) req.overrideMimeType('text/xml');
+
-
req.onreadystatechange = function() { //początek wewnętrznej funkcji
+
-
if (req.readyState == 4) if (req.status == 200)  
+
-
            {
+
-
document.getElementById("progress").innerHTML=req.statusText;          
+
-
 
+
-
document.getElementById("html").innerHTML=req.responseText;
+
-
htm=document.getElementById("html");
+
-
 
+
-
document.getElementById("result").innerHTML=htm.getElementById("WarNotebook").innerHTML;
+
-
 
+
-
}
+
-
 
+
-
 
+
-
}; //koniec wewnętrznej funkcji
+
-
 
+
-
req.open('GET', adresbase+nday, true);
+
-
req.send(null);
+
}  
}  
 +
document.getElementById("html").innerHTML=getQuerystring("action","browse");
-
dom("10_July_2008");
+
/* ]]> */</script>
-
 
-
/* ]]> */</script>
 
-
zfdsfd
 
</html>
</html>
{{WarNotebookEnd}}
{{WarNotebookEnd}}

Revision as of 19:43, 25 October 2008

Gallery Bricks Notebook Team Project Home