Answer the question
In order to leave comments, you need to log in
Delphi. TWebBrowser. JavaScript error: "Permission denied" or "It implies the existence of an object"?
Hello, dear Habra community. I understand that Delphi is no longer on the rake of a technical wave, but a girl asked me to help and I turn to you for help.
There is a program on Delphi 5 (do not ask why such an antiquity). In it, in the web browser component (TWebBrowser), some page containing html code and javascript is loaded. When trying to call javascript from an application, some users get errors - "Access denied" or "object implied". The error is cured only by reinstalling IE (In Vista only from IE 8 to IE 9, in XP and 7 from one version to the same one). Can't play locally.
The code of the function that throws the error:
function InitFileSpec(FileName1, FileName2)
{
FileSpec1 = FileName1;
if (FileSpec1 == null || FileSpec1 == '')
FileSpec1 = 'DefaultFileName1.xml';
FileSpec2 = FileName2;
if (FileSpec2 == null || FileSpec2 == '')
FileSpec2 = 'DefaultFileName.xml';
}
Answer the question
In order to leave comments, you need to log in
If you are 100% sure that the error is in this piece of code (and I'm not sure about this), then this can happen if:
1) you pass not a string, but some kind of browser object instead of FileName1 or 2, and IE breaks at the moment comparisons FileSpec ==…
2) If you have a DOM element with id=FileSpec1 or FileSpec2 or a form or form element with that name.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question