window.location = 'http://...';
now I want to assign this location path to a variable, as a normal text string.
I want to achieve:
var Path = 'http://...';
i tried to use:
var Path = window.location;
but I get, as this var value:
function Path() { [native code] }
while I want to have the location text string as its value..
Yes,
window.locationis an object, itshrefproperty returns the entire URL.See here for a reference on the
locationobject (location‘s other properties & functions can be useful): http://developer.mozilla.org/en/DOM/window.location