Closed
Bug 88291
Opened 25 years ago
Closed 25 years ago
Javascript error due top.LeftMenu.document has no properties
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: urbanekx, Assigned: pollmann)
References
()
Details
(Whiteboard: [DUPEME])
Attachments
(1 file)
|
18.31 KB,
text/plain
|
Details |
Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:0.9.1+) Gecko/2001062804
Error: top.LeftMenu.document has no properties
Source File: http://www.ebanka.cz/menunn.js
Line: 254
this is output of JavaScript Console. In IE5 and N4.xx this page work fine.
The page is loaded, but left frame for menu is white without content.
Comment 1•25 years ago
|
||
Using Mozilla binaries 20010615xx on WinNT, Linux.
Confirming bug. OS : Windows ME ---> All.
The left frame is defined as follows:
<frame name="LeftMenu" src="javascript:top.ResolveBrowsers();" marginwidth etc.
The function ResolveBrowsers is as follows:
function ResolveBrowsers()
{
if (allowedBrowser)
{
top.v_Menu.Show(x1,x2,x3);
} else
{
top.location="BadBrowser.html";
}
}
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows ME → All
Comment 2•25 years ago
|
||
"allowedBrowser" is resolving to true in Mozilla, so we are driven
to the line
top.v_Menu.Show(x1,x2,x3);
The v_Menu object is defined in the menunn.js file.
I'll attach it below -
Comment 3•25 years ago
|
||
Comment 4•25 years ago
|
||
In the menunn.js file, the error indicated above:
Error: top.LeftMenu.document has no properties
Source File: http://www.ebanka.cz/menunn.js
Line: 254
occurs in this function:
function ShowJSMenu(a_menu, a_submenu, a_location)
{
etc.
etc.
var v_html = '<HTML>\r\n<HEAD>\r\n' +
etc.
etc.
top.LeftMenu.document.open(); <---------------- ERROR OCCURS HERE
top.LeftMenu.document.write(v_html);
top.LeftMenu.document.close();
}
Comment 5•25 years ago
|
||
So the problem seems to be: if we have a frame with name="LeftMenu"
<frame name="LeftMenu" src="javascript:top.ResolveBrowsers();" etc. >,
and src="javascript:top.ResolveBrowsers();" is going to do
top.LeftMenu.document.(something), is this supposed to work?
Apparently it does in NN4.x ...
Browser, not engine. Reassigning to DOM Level 0 for further analysis -
Assignee: urbanekx → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → desale
Comment 6•25 years ago
|
||
Ok, so the reason for this problem is that the script tries to access a frame
before the content of the frame is loaded, in this case the content of the frame
should be the result of evaluating the javascript: URL. This boils down to our
problem with not having a document in frames/iframes before the document in the
frame/iframe is loaded, well known problem, I'm sure pollmann has a dupe of this
bug, reassigning to pollmann. Thank Phil once again for completely debugging the
problem :-)
Assignee: jst → pollmann
Comment 7•25 years ago
|
||
Whiteboard: [DUPEME]
Comment 8•25 years ago
|
||
Marking as dup of bug 22681. If you don't agree, please reopen, thanks!
*** This bug has been marked as a duplicate of 22681 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Comment 9•25 years ago
|
||
Comment 10•25 years ago
|
||
/me thinks fixing one will fix the other...
maybe we should mark them dependant instead?.. thanks for pointing it out
You need to log in
before you can comment on or make changes to this bug.
Description
•