I have Javascript as below:
<script type="text/javascript" language="javascript">
function redirectToPrevious(abcURL)
{
window.location.replace(abcURL);
}
function redirectToNext(xyzURL)
{
window.location.replace(xyzURL);
}
</script>
<input type="button" value="submit" onclick="redirectToNext('<%=abcURL>');"/>
In the above Javascript, I want the URL passed which is abcurl to displayed in the same tab/page where submit button is clicked. For certain URLs get invoked or displayed under same tab in window, but for certain URLs it gets displayed in a new tab. What might be the problem?
Can anyone help me on this?
And what is the difference in these urls ? – are perhaps some of them in a different zone (thinking ie security settings here). Also how is the javascript invoked – e.g. from an anchor tag, or a button etc.