Any smart way of doing a \"root\" based path referencing in JavaScript, just the way we have ~/ in ASP.NET?
~/
Have your page generate a tag with something like:
Then, have a function in JavaScript that extracts the value such as:
function getHome(){ return document.getElementById("ApplicationRoot").href; }