Instead of using the window.open command in javascript -- which only creates a pop-up window -- how would someone use javascript to reassign the URL to a completely new area?
Asked
Active
Viewed 931 times
-2
-
Better yet, how would you open a new tab in the browser. – xarzu Nov 06 '13 at 00:26
-
Javascript can't distinguish between tabs and windows. – Barmar Nov 06 '13 at 00:27
3 Answers
0
How about window.location.href = 'http://www.google.com'; //Will take you to Google. See this write up http://davidwalsh.name/javascript-window-location

Scary Wombat
- 44,617
- 6
- 35
- 64
0
or if you don't want the current page in the browser history, use
window.location.replace("New URL");

EJK
- 12,332
- 3
- 38
- 55