Javascript: open new page in same window
<script type="text/javascript">
window.open ('YourNewPage.htm','_self',false)
</script>
see reference: http://www.w3schools.com/jsref/met_win_open.asp
try this it worked for me in ie 7 and ie 8
$(this).click(function (j) {
var href = ($(this).attr('href'));
window.location = href;
return true;
The second parameter of window.open() is a string representing the name of the target window.
Set it to: "_self".
<a href="javascript:q=(document.location.href);void(open('http://example.com/submit.php?url='+escape(q),'_self','resizable,location,menubar,toolbar,scrollbars,status'));">click here</a>
Sidenote:
The following question gives an overview of an arguably better way to bind event handlers to HTML links.
What's the best way to replace links with js functions?
<a href="javascript:;" onclick="window.location = 'http://example.com/submit.php?url=' + escape(document.location.href);'">Go</a>;