source: branches/new-datamodel/playground/url_test.js

Last change on this file was 315, checked in by lgiessmann, 14 years ago

The ajax host prefix in constants.js is set automatically --> different mappings works for the same server now; the admin needn't set the host prefix manually

File size: 367 bytes
Line 
1function entryPoint(){
2    var elem = getElem();
3    var url = window.location.href;
4    var urlFrags = url.split("/");
5    var newUrl = "";
6    for(var i = 0; i !== urlFrags.length; ++i){
7        if (newUrl.length !== 0) newUrl += "/";
8        newUrl += urlFrags[i];
9    }
10    elem.innerHTML = " " + newUrl;
11}
12
13
14function getElem(){
15    return document.getElementById("content");
16}
Note: See TracBrowser for help on using the repository browser.