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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access denied - weird... 1

Status
Not open for further replies.

maxelcat

Technical User
Oct 19, 2006
79
Hi all

Is this a place to post aobut IE6?

If it is here goes...

I have a little javascript function that opens a new browser window. NOthing difficult. It works fine in Netscape and FF. In IE6 it works fine if I run it from a server. If I run it from my c-drive I get a JS error "Access denied" and the little yellow shield.

I have tried editing my intranet settings in security to no avail. It also comes up with javascript errors on certain websites that I know are very well programmed - and that my other pc shows no such error fro (its running IE6 too).

Any ideas what I should do - how about uninstall and reinstall?

Thanks in advance

Edward
 
You need to show your code for us to be able to help you accurately.

Lee
 
Here's the code for the whole page. The bit in red/yellow is the function I added.

It is called form inside the swf file.


Thanks again
Edward


<html xmlns=" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />




<script language="JavaScript">
<!--

function SymError()
{
return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
return (new Object());
}

window.open = SymWinOpen;

//-->
</script>

[COLOR=red yellow]<script language="JavaScript">
function openWin(url,w,h)

{
var winprop = "Width="+w+",height="+h+",scrollbars=yes,resizable=yes";
openwin=window.open(url,'newwin',winprop);
}
</script>
[COLOR=red yellow]

<title>site</title>
</head>
<body bgcolor="#661900">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" width="750" height="500" id="site" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="site.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#661900" /><embed src="site.swf" quality="high" bgcolor="#661900" width="750" height="500" name="site" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" />
</object>
</body>
</html>

<script language="JavaScript">
<!--
var SymRealOnLoad;
var SymRealOnUnload;

function SymOnUnload()
{
window.open = SymWinOpen;
if(SymRealOnUnload != null)
SymRealOnUnload();
}

function SymOnLoad()
{
if(SymRealOnLoad != null)
SymRealOnLoad();
window.open = SymRealWinOpen;
SymRealOnUnload = window.onunload;
window.onunload = SymOnUnload;
}

SymRealOnLoad = window.onload;
window.onload = SymOnLoad;

//-->
</script>
 
Sorry, closed the TGML tag wrongly....


<html xmlns=" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />




<script language="JavaScript">
<!--

function SymError()
{
return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
return (new Object());
}

window.open = SymWinOpen;

//-->
</script>
[COLOR=red yellow]
<script language="JavaScript">
function openWin(url,w,h)

{
var winprop = "Width="+w+",height="+h+",scrollbars=yes,resizable=yes";
openwin=window.open(url,'newwin',winprop);
}
</script>
[/color]

<title>site</title>
</head>
<body bgcolor="#661900">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" width="750" height="500" id="site" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="site.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#661900" /><embed src="site.swf" quality="high" bgcolor="#661900" width="750" height="500" name="site" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" />
</object>
</body>
</html>

<script language="JavaScript">
<!--
var SymRealOnLoad;
var SymRealOnUnload;

function SymOnUnload()
{
window.open = SymWinOpen;
if(SymRealOnUnload != null)
SymRealOnUnload();
}

function SymOnLoad()
{
if(SymRealOnLoad != null)
SymRealOnLoad();
window.open = SymRealWinOpen;
SymRealOnUnload = window.onunload;
window.onunload = SymOnUnload;
}

SymRealOnLoad = window.onload;
window.onload = SymOnLoad;

//-->
</script>
 
I think the problem is in the following two code blocks.

Code:
<script language="JavaScript">
<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
  return (new Object());
}

window.open = SymWinOpen;

//-->
</script>

...AND...

Code:
<script language="JavaScript">
<!--
var SymRealOnLoad;
var SymRealOnUnload;

function SymOnUnload()
{
  window.open = SymWinOpen;
  if(SymRealOnUnload != null)
     SymRealOnUnload();
}

function SymOnLoad()
{
  if(SymRealOnLoad != null)
     SymRealOnLoad();
  window.open = SymRealWinOpen;
  SymRealOnUnload = window.onunload;
  window.onunload = SymOnUnload;
}

SymRealOnLoad = window.onload;
window.onload = SymOnLoad;

//-->
</script>

This code is added into pages when you have Norton Internet Security running on a PC. This code is the code that blocks pop-up windows. Try enabling pop-ups on the site where your page resides through the Norton pop-up blocker and see if that helps.

Usually in IE, it's a toolbar icon that looks like a globe and it is labled as "Web Assistant". Make sure "Block Pop-ups on this site" is UNCHECKED. The reason it works in other browsers is that this toolbar only gets installed in IE (I believe).
 
That's very kind.

I will certainly look at that - I am running McAfee on that PC where the problem is, but I guess the idea is the same.

Incidentally, the problem PC still works fine when its connected to the net - the issue only arises when I run the webpages from my C-drive

Will post when I have looked into it!

Edward
 
Running HTML pages locally, not through a web server, will result in script warnings every time in WinXP. The way to avoid this is to use a web server to process the pages, and set your popup blocker to allow popups from the localhost.

Lee
 
Just turning off the pop-up blocker didn't work? It works for me.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top