Team:TU Delft/test

From 2010.igem.org

(Difference between revisions)
 
Line 118: Line 118:
function include_js(file, cb) {
function include_js(file, cb) {
-
    var html_doc = document.getElementsByTagName('head')[0];
+
var html_doc = document.getElementsByTagName('head')[0];
-
    var js = document.createElement('script');
+
var js = document.createElement('script');
-
    js.setAttribute('type', 'text/javascript');
+
js.setAttribute('type', 'text/javascript');
-
    js.setAttribute('src', file);
+
js.setAttribute('src', file);
-
    html_doc.appendChild(js);
+
html_doc.appendChild(js);
-
    js.onreadystatechange = function () {
+
js.onreadystatechange = function () {
-
        if (js.readyState == 'complete') {
+
if (js.readyState == 'complete')
-
cb();
+
cb();
-
        }
+
}
-
    }
+
-
    js.onload = cb;
+
js.onload = cb;
}
}
Line 220: Line 219:
if(this.hash) {
if(this.hash) {
-
//this.href = this.hash;
 
var anchor = this.hash.substring(1);
var anchor = this.hash.substring(1);
if (anchor.substring(0,5)!='page=')
if (anchor.substring(0,5)!='page=')
this.href = '#page=' + currentPage + ampersandStr + 'anchor=' + anchor;
this.href = '#page=' + currentPage + ampersandStr + 'anchor=' + anchor;
-
 
} else if(txt != "edit")
} else if(txt != "edit")
this.href = this.href.replace("https://2010.igem.org/Team:TU_Delft/", "#page=");
this.href = this.href.replace("https://2010.igem.org/Team:TU_Delft/", "#page=");

Latest revision as of 20:56, 26 October 2010