The
pathname[
^] property will return everything
except the host.
What you're looking for is something like this:
var protocol = window.location.protocol;
var host = window.location.host;
var newHost = 'About.aspx';
var url = protocol + '//' + host + '/' + newHost;
window.open(url);
Various browsers have capabilities, either built-in or by an extension, to debug JavaScript. These will allow you to debug your JavaScript, and experiment to see what certain code does and what various objects represent.
Chrome's developer tools[
^]
Internet Explorer's developer tools[
^]
Firebug for FireFox[
^]