Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirection being blocked by Internet explorer

Status
Not open for further replies.

jes12345

Programmer
Feb 9, 2006
2
NO
Hi,
I am trying to write a javascript that will redirect to another page.... Should be straight forward but in version 6.0.2900 of IE with XP my browser is "blocking active content". Do anyone know if there is a way to write a redirect script that IE will allow?

(Btw using META tag is not an option since I need to test a variable...)

<html>
<head>
<script language="JavaScript">

function doRedirect()
{
window.location.replace( " );
}
</script>
</head>

<body onload="doRedirect();>

<p>Loading <a href=" target</a></p>
<p>If you can see this please click above</p>

</body>
</html>
 
You've said yourself that your browser is blocking active content (which include scripts), yet in the same sentence you ask how to run scripts. The obvious answer is: You can't bypass built-in security with scripts, otherwise every malicious hacker out there would be doing so.

You either need to enable scripting or use the meta tag.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Hi Dan,
Thanks for your reply but as a programmer you should know that everything is possible. I think I may have come up with a solution where I use php to do this serverside rather than on the client....
(However I am sure there is a way around it in clientside scripting as well ;) built-in security is not finite and this is not a hacker speaking - However I just don't have the time to find it right now....)

J
 
I'm 99.9% sure that if you do not enable scripting, then you cannot use scripting to do testing or redirecting - because it is [!]disabled[/!].

If you think you can bypass the built-in security of IE, then I'd certainly love to see the solution, and will gladly eat my words.

Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top