Possible Duplicate:
Creating a new Location object in javascript
If the user inputs a string that is a URL, what's the easiest way to turn it into a Location object (like window.location) so I can use methods and properties like obj.hostname?
Possible Duplicate:
Creating a new Location object in javascript
If the user inputs a string that is a URL, what's the easiest way to turn it into a Location object (like window.location) so I can use methods and properties like obj.hostname?