473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

JS error: "Permission denied to get property HTMLDocument.window" in Firefox 1.0.6

Intermittently I get the following error on Firefox:

"Error: uncaught exception: Permission denied to get property
HTMLDocument.window"

What can cause this error? I do an image switch via JS just before
redirecting the page (also via JS), could this be the problem - not
giving enough time to do the image switch before redirecting?

Pieces of the page I created that generated this error are below. The
page basically swaps an image on the page with a new one when a user
clicks on a link before the link is followed.

<script>
function userSelectedChoice() {
var pickIMG = "";
pickIMG = new Image();

if (document.images){
pickIMG.src = "choice1.gif";
document.images.manualpick.src = pickIMG.src;
}
this.location = someURL;
}
<script>
<body>
{user clicks on an <a href="javascript:userSelectedChoice()...>, the
above JS
gets executed, the <img> below is swapped out before page reloads}

<img src="default.gif" alt="-" name="manualpick" id="manualpick">

</body>

Aug 4 '05 #1
2 14912


John Mack wrote:
Intermittently I get the following error on Firefox:

"Error: uncaught exception: Permission denied to get property
HTMLDocument.window"
Does the console not tell you the line that causes the error?

{user clicks on an <a href="javascript:userSelectedChoice()...>,


Code that as
<a href="#"
onclick="userSelectedChoice(); return false;">
to see whether that improves things.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 4 '05 #2
My replies:
Q: "Does the console not tell you the line that causes the error?"
A: No, using the Firefox JS console I do not get a line number.
Haven't seen an error at all yet in IE 6 or Opera 7.53

Testing with your suggestion...

Aug 4 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Yitzhak | last post by:
I am having "Permission denied" error while calling LogEvent method of WScript.Shell component. Basically, ASP page calls Windows Script Host Shell component to log events to the OS Application...
4
by: Paul Thompson | last post by:
I am getting an odd, inscrutable error in Mozilla Firefox. When I use an array to shift focus to an element, I get the error Error: " nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" ...
2
by: dx27s | last post by:
Hi all, I'm working with the XMLHttpRequest object. I receive the following error message: "Permission denied to call method XMLHttpRequest.open" This occurs in Firefox only. IE works fine. ...
1
by: Mark E. Hamilton | last post by:
Sorry, I probably should have re-stated the problem: We're using Python 2.3.5 on AIX 5.2, and get the follow error messages from some of our code. I haven't yet tracked down exactly where it's...
3
by: FD | last post by:
A COM was used in VBscript and worked fine. Now I try to use C# to call it with following code: Type myType = Type.GetTypeFromProgID("MyProgID"); object myObj = Activator.CreateInstance(myType);...
0
by: Jordan | last post by:
When I run this code in IExploer with XP sp2 and click on LinkButton javascript bellow fire error: Error:Permission error on row !!!!!!!!!!!!. And same code work fine after comment row **********....
1
by: prash.marne | last post by:
Hi, I am trying open a simple popup window & my code is .. <html> <head> <title>popup_window</title> <script type="text/javascript"> function popup_onclick(){ my_window =...
3
by: hussain123 | last post by:
We have a main window (call it Parent). Clicking on a link in the main window will open up another IE window (Child) using the loadInFrame() method. In the Child window, i load another IE window...
1
by: Snolly | last post by:
Hi all, I am using the open source dojo toolkit v .4.3 (I know it's old but can't upgrade). I have a page with an iframe in it. When the page loads, the iframe is pointing at a local resource...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.