Windows Vista Tips

Windows Vista Tips > Newsgroups > Internet Explorer > window.location opens the link in a new window

Reply
Thread Tools Display Modes

window.location opens the link in a new window

 
 
Venkat
Guest
Posts: n/a

 
      11-09-2006
Hi,

I am using the following script to open a URL in the same window.

<HTML>
<HEAD>
<TITLE>Test</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html">
<script LANGUAGE="JavaScript">
<!--
function UrlRedirect()
{ this.location.href =
("http://localhost/Test2/Default.asp?fromShortcut=yes"); }
</script>
</HEAD>
<BODY BGCOLOR="#FFFFFF" text="#c0c0c0" topmargin="0" onload="UrlRedirect()">
</BODY>
</HTML>

I have created a short cut menu for this file say Redirect.html, When user
clicks on short cut this page opens and redirects to Test2/default.asp in the
same window. This was working in IE 6.0 and in IE7.0 in all the Operating
Systems except on Vista RC1.
I have tried the following script also and facing the same problem
<html>
<head>
<title>Test</title>
<meta http-equiv="refresh" content="0; URL=http://www.msn.co.in">
<meta name="keywords" content="automatic redirection">
</head>
<body>
</body>
</html>
I have tried the following script too and this also opens in a new window
instead of the same window
<html>
<head>
<title>Test 3</title>
<script language="javascript" type="text/javascript">
<!--
window.location="http://www.msn.co.in";
// -->
</script>
</head>
<body>
</body>
</html>
Please let me know how can I modify the script to open the redirected URL in
the same window & tab. The above behavior i sobserved in Vista RC 1 with IE
7+ Thanks in advance

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Link opens in new window when it shouldn't! Gordon Internet Explorer 3 11-01-2006 10:00 PM
window.location opens the link in a new window Venkat Internet Explorer 0 10-09-2006 08:46 AM
window.location opens the link in a new window Venkat Internet Explorer 0 10-03-2006 06:18 AM
Ctrl-Click Opens blank window instead of link in new tab exit17 Internet Explorer 8 05-14-2006 08:54 PM
IE7 Closes original window when opening link in new window Nathanael Internet Explorer 0 05-01-2006 01:00 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59