Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-20-2004, 09:38 PM   PM User | #1
calophi
New to the CF scene

 
Join Date: Oct 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
calophi is an unknown quantity at this point
Unhappy Javascript/CSS Tree Renders Improperly In Safari

There is a Javascript tree put out by Netscape that renders in most of the major browsers: IE, Netscape, Mozilla, Firefox, and Camino to name a few. However, in Safari (and, I believe, Opera), instead of rendering as an expandable and collapsible tree, the menus overlap each other on a single line, making it unusable.

Example

xbCollapsibleLists.js file

Does anyone know where in this code is causing Safari to become hung up? I'm completely baffled. I have a newer tree script that renders fine in Safari, but for the particular application I'm working on, support for older browsers is crucial and we already have a modification of this code that will work in old versions of Netscape.

Last edited by calophi; 10-20-2004 at 09:41 PM..
calophi is offline   Reply With Quote
Old 10-22-2004, 10:05 AM   PM User | #2
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
I would say rather that the browser detector (ua.js or smth like that) is not apopiate...
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor is offline   Reply With Quote
Old 10-27-2004, 02:52 PM   PM User | #3
calophi
New to the CF scene

 
Join Date: Oct 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
calophi is an unknown quantity at this point
Actually I discovered that Safari (and Opera for that matter) doesn't handle absolute position correctly. ::sighs::
calophi is offline   Reply With Quote
Old 10-27-2004, 05:54 PM   PM User | #4
liorean
The thread killer


 
Join Date: Feb 2003
Location: Umeå, Sweden
Posts: 5,575
Thanks: 0
Thanked 84 Times in 75 Posts
liorean will become famous soon enoughliorean will become famous soon enough
I have a hard time believing it's absolute positioning that doesn't work - it works in numerous sites out there. In that css, the only thing I would suspect them to not handle perfectly is clipping. However, I am seriously questioning the xbStyle and browser sniffer scripts. I suspect that's where your problems lie. Remember, Safari didn't even exist when the xbStyle script was last edited, and Opera was severely behind.
__________________
liorean <[lio@wg]>
Articles: RegEx evolt wsabstract , Named Arguments
Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards
liorean is offline   Reply With Quote
Old 10-27-2004, 06:15 PM   PM User | #5
calophi
New to the CF scene

 
Join Date: Oct 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
calophi is an unknown quantity at this point
I had done alerts to see which sections of the scripts were being called, and everything seemed to be fine. Therefore I ruled out the other extra scripts.

Once I switched all the positions to relative, the menu no longer stayed on one line, it expanded out. But it looked like crap, and the expand/collapse functions also looked bad. So it has to do with the way the absolute positioning is being used in this particular case.
calophi is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:20 PM.


Advertisement
Log in to turn off these ads.