Monday, July 9, 2007

getLocationRoot()

This javascript function will return the root of the current page location.

function getLocationRoot() {
var sLocation = document.location.toString()
return sLocation.substr(0, sLocation.indexOf(document.location.pathname))
}

No comments: