Closed Bug 67147 Opened 25 years ago Closed 23 years ago

berculo.com - Javascript-powered menu doesn't function

Categories

(Tech Evangelism Graveyard :: Dutch, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: reinout, Assigned: tristan)

References

()

Details

(Whiteboard: [TOOL][DYNAPI])

Attachments

(8 files)

The Javascript menu on the left hand side of this page works great with IE and NS 4.x, however Mozilla can't execute it. No messages in the Javascript console either.
I'm pretty sure it's because of the use of layers in the javascript menu. Mozilla does not now and will never support layers.
The file 'dynlayer.js' contains a browser sniffer. Here's a snap of that code: this.ns = (this.b=="ns" && this.v>=4) this.ns4 = (this.b=="ns" && this.v==4) this.ns5 = (this.b=="ns" && this.v==5) And here's the line that is causing the bug effect: if (arguments.length>=6 && color!=null) str += (is.ns)? ' layer-background-color:'+color+';' : ' background-color:'+color+';' If you replace "writeCSS(collapse.css)" with "writeCSS(collapse.css,1)" you will see that it's writing layer-background-color. This is not a bug in Mozilla, but in the Javascript. Reinhout, if you need help bugs4hj@netscape.net
"&& !is.ns5" will do the trick.
Marking INVALID. Not our problemm its the sites problem.
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
But that won't help the reporter, right?
This is a valid bug for the Evangelism component - reopening -
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Reassigning to Evangelism component -
Assignee: rogerl → evangelism
Status: UNCONFIRMED → NEW
Component: Javascript Engine → Evangelism
Ever confirmed: true
QA Contact: pschwartau → zach
Thank you very much Phil. Note: "is.ns" should not be valid, if the browser version equals 5, that's the problem here. The check "&& this.v>=4)" is true for version 5 and that's why it's matching 'layer-background-color', in stead of 'background-color' for Mozilla/Netscape (5)
I will attach a file below that includes all the HTML and JavaScript in-line! I have added some debugging code, all marked by lots of //////////////'s. The debugging code shows the properties of the "is" object, which contains the results of the browser-sniffing. As H-J points out, the dynamic CSS writes out "layer-background-color" no matter what the version of NS: // CSS Function function css(id,left,top,width,height,color,vis,z,other) { if (id=="START") return '<STYLE TYPE="text/css">\n' else if (id=="END") return '</STYLE>' var str = (left!=null && top!=null)? '#'+id+' {position:absolute; left:'+left+'px; top:'+top+'px;' : '#'+id+' {position:relative;' if (arguments.length>=4 && width!=null) str += ' width:'+width+'px;' if (arguments.length>=5 && height!=null) { str += ' height:'+height+'px;' if (arguments.length<9 || other.indexOf('clip')==-1) { str += ' clip:rect(0px '+width+'px '+height+'px 0px);' } } if (arguments.length>=6 && color!=null) str += (is.ns)? 'layer-background-color:'+color+';' : ' background-color:'+color+';' if (arguments.length>=7 && vis!=null) str += ' visibility:'+vis+';' if (arguments.length>=8 && z!=null) str += ' z-index:'+z+';' if (arguments.length==9 && other!=null) str += ' '+other str += '}\n' return str } However, I put in a regular-expression to change "layer-background-color" to "background-color", which is W3C-compliant. It makes no difference for me, the attachment works in NN4.7 but not in Mozilla. So I'm still not sure of the exact error - anyone feel free to continue debugging this. At least this file has all the JavaScript in-line ...
Try the attachment and compare NN4.7 (or IE4.7) with Mozilla. In Mozilla, you get no errors in the JavaScript console - but none of the lower-level menu items are visible. Perhaps someone could debug how visibility of these items is controlled - In the meantime, also note Evangelism bug 54458, "List of XBDHTML sites based on Dan Steinman's Dynamic Duo API". This site is using the Dan Steinman API -
Note Mozilla handles the attachment slightly differently on Linux. On WinNT or Mac, I only see the "Home" icon. On Linux, part of lower icons are visible (for example "Aktiviteiten"), but are not functional. Again, not sure what the exact problem is here. The attachment above seems to show it is not the use of "layer-background-color" in the <STYLE>. It changes that to "background-color", yet the problems still occur -
I also mailed the sites' author on this issue, and he has incorporated some of your suggestions on http://www.berculo.com/awepa/web (different site, same menu). On OS/2 (the platform I'm on at the moment) this makes a difference in that some of the menu items are displayed, though it looks messy and the links still don't work.
Ok, after reading my e-mail, I took a second look, and this time a bit longer. The biggest pain on this site is that document.getElementById( id ) not the expected "[object HTMLDivElement]" returns but, yes I know it sounds odd, but for real, it return "{}". And thats why the height is not set correctly for the menu items, and as result you don't see a thing. After poking a bit in the source, I now have a visual menu, and can also open the first menu "Activiteiten" I only need some directions why that stupid document and node are returned as "{}". I', sure I can get this thing working, if I know how to fix that problem. note, in left.html is something as: if(is.ns) blabla put that into an alert, and you will see the first problem! Most friendly, HJ.
Blurp, I have a working menu. Now I need to check if this works with MSIE and Netscape 4.x. But that's for next week. Now it's party time.
Attached file dynlayer.js —
Attached file collapsemenu.js —
Attached file dynlayer-common.js —
Attached file dynlayer-glide.js —
Attached file left.html —
Ok, I'm not flying Learjet but, this seems to work pretty well.
H-J, nice work!!! We can now see that to get the given site to work, http://www.berculo.com/aureus/left.html all we have to do is change the URLs for its four included JS files to the four attachments you have placed above. Now all we need to know is: did you have to change all four JS files, or just dynlayer.js? What is the MINIMUM change necessary in the JS files to make everything work? Again, great job on your part. Thanks! I know the
I would say just replace dynlayer.js and dynlayer-common.js. This files contain the most important changes. But I will post a new dynlayer.js. There where still some leftovers, alerts, and a small fix in function DynLayerSlideStart(). In general it's all about better browser selection, the is.ns5 and !is.ns5 stuff in the sources. And some other small javascript corrections. The most important changes I made in the function: DynLayer(), DynLayerSlideStart(), DynLayerGetContentHeight(), DynLayerInit(), . BTW: I've spend the most time with a new javascript bug, yet to be filed.
Attached file That other site —
Next.
Huh, once again. "Next." should be a complete comment about all the other sites using the same library.
Note Evangelism bug 54458 - "List of XBDHTML sites based on Dan Steinman's Dynamic Duo API".
Whiteboard: [compare bug 54458]
Reassigning evangelism bugs to bclary@netscape.com.
Assignee: evangelism → bclary
I checked the above url and it still is getting layer related errors as well as errors trying to write to read only properties. Dan Steinman no longer supports this project. Please see the updated project at http://dynapi.sourceforge.net/dynapi/ Setting dependency on the DYNAPI tracking bug and assigning to Zach since he owns the tracking bug. Zach if you want to hand this one off or recruit help, let me know. Bob
Assignee: bclary → zach
Blocks: 54458
Whiteboard: [compare bug 54458] → [TOOL][DYNAPI]
>I checked the above url and it still is getting layer related errors as well as >errors trying to write to read only properties. Yes, but that's only because that this site is not using the new library :) On my own Apache server it looks great and works faster now. They should replace the old library with the changed one, that's all. >Dan Steinman no longer supports this project. Please see the updated project at >http://dynapi.sourceforge.net/dynapi/ I rewrote/changed the library to make it work, without any errors :) /HJ
All Evangelism Bugs are now in the Product Tech Evangelism. See bug 86997 for details.
Component: Evangelism → US English
Product: Browser → Tech Evangelism
Version: other → unspecified
Summary: Javascript-powered menu doesn't function → berculo.com - Javascript-powered menu doesn't function
Why do I own this. Get rid of it.
Assignee: zach → bclary
-> euro west
Assignee: bclary → nitot
Component: English: US → Europe: West
QA Contact: zach → caillon
Confirming on Win2K. Page takes several minutes to load in IE and does not work in Netscape 6.2. Priority : P3. HJ : you mention a library they should use. Where is it ? I'd be glad to send them the URL so they do the fix. Contact : aureus@econ.vu.nl
Status: NEW → ASSIGNED
Priority: -- → P3
Blocks: 113492
No longer blocks: 113492
New Component
Component: Europe: West → Dutch
Seems no longer relevant.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 23 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: