Javascript: open new page in same window

55skidoo picture 55skidoo · Nov 6, 2008 · Viewed 423.4k times · Source

Is there an easy way to modify this code so that the target URL opens in the SAME window?

Answer

parwaze picture parwaze · Aug 24, 2011
<script type="text/javascript">
window.open ('YourNewPage.htm','_self',false)
</script>

see reference: http://www.w3schools.com/jsref/met_win_open.asp