Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10

Thread: dhtml in opera?

  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    dhtml in opera?

    I've gotta opera 6 for testing and to me its a really bad browser. It may be fast but it does a really really bad job or imitating browsers. I can't seem to get clipping to work in the "IE5.0" engine or the Opera 6.0 engine or Mozilla 5.0. NS4.78 seems to "sorta" and Mozilla 3.0 seems to be ok as well. Seriously, if your gonna imitate a browser, do it properly. Can anymore give my some help on opera workarounds are a resource for opera dhtml scripting.
    - Maximus

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    The only person I've seen seriously take to attempting DHTML for Opera is a member here by the name of brothercake.

    Personally, Opera has the second best-CSS support (Gecko is the best, followed by Opera, with IE in the last), but is incapable of modifying the document structure after the page loads, which instantly makes it worthless for many dynamic effects. Opera 7 I read shall fix that, and we will see...

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    From what I understand the next version is supposed to have better DOM support. This might help in the mean time.

    :: ok browser detect? ::

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Firstly - forget about Opera's emulation modes, they're for users not developers. Basically, a lot of sites employ global sniffer scripts which check for a version of IE or netscape and redirect all others to one of thsoe stupid "please upgrade your browser" pages. That's what emulation is for - Opera, set to idenitfy as MSIE, will get through the sniffer and attempt to run the code - sometimes successfully - because of Opera's bizzarre and patchy support for some proprietary IE features like document.all - but mostly not, because of Opera's severely limited DOM parsing module.

    I sympathise with Opera for doing this - without it, many, otherwise very simple sites, would not be accesible to Opera at all.

    But this in itself creates another problem, because Opera is not MSIE, or Netscape, or anything else other than Opera. It is a logic unto itself and always needs to be treated separately.

    Fortunately, Opera has a unique object you can use to identify it, which works at all emulation modes, namely:

    Code:
    if(typeof window.opera != "undefined" ) { ... opera code ... }

    If you want (or need) to differentiate between Opera 5 and 6, a more generic sniffer script might be useful - such as http://www.brothercake.com/scripts/sniffer.shtml


    So, the most important thing is always have your Opera set to "identify as Opera", and always use the w3c methods like document.getElementById - never use document.all in Opera - getElementById works at all emulation modes, where .all only works in MSIE mode. Using the w3c collections will allow you to develop code that's not affected by the emulation mode the user has set.

    Then remember these important limitations:

    1 - no dynamic element modification of any kind, not even image resizing

    2 - no support for clip

    3 - no support for <img onload

    4 - no support for offset properties in Opera 5, but Opera 6 is okay with this

    You can find more comprehensive specs at http://www.opera.com/docs/specs/js/


    Like jkd said, Opera CSS support rocks. We can only hope that Opera 7 brings in some proper DHTML. In the meantime, most javascript and simple dhtml is possible in Opera, like this
    Last edited by brothercake; 07-30-2002 at 12:07 PM.

  • #5
    New Coder
    Join Date
    Jul 2002
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the info. I'll give the sources a look.

    I must admit that I have no idea what you mean by Opera having great CSS support. I've almost never run into any problems with IE CSS support. The only problem I've seen in IE with CSS is that the filter prop won't work unless you have a width prop stated. I guess if you guys care, you might be able to fill me in on a little explaination as to why Opera and NS7 have such great CSS support.
    - Maximus

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Opera supports more w3c CSS standards than IE. You just can't manipulate many of them after the page is loaded.

  • #7
    New Coder
    Join Date
    Jul 2002
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hehehe... So it doesn't exactly mean that the CSS is better. It just means it kisses W3Cs *** better :P You can understand why NS would be so big on the support, they got nothing going for them right now except that they can say they "strictly" follow W3C standards...
    - Maximus

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Not really, CSS support is better. DOM support is worse.

    You should try Mozilla 1.0 (I think 1.1 is out). I find it's faster than IE6 and has better features (like "Tabs" and the bookmark interface).

  • #9
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by Maximus - DFX
    Hehehe... So it doesn't exactly mean that the CSS is better. It just means it kisses W3Cs *** better :P
    No, it means they care about making the developer's life easier. IE is missing out on some of the most powerful properties in CSS2, as well as most of the useful selectors. Working around them bloats your markup, and on top of working around all of IE's other quirks, you get ugl(ier)y markup that what you would have had.

    This is a different argument for a different topic though, and one that I talk about a lot on these forums.

    Just remember, W3C is there to make your life easier. If you don't mind writing 3 different codes for each browser, then go ahead and ignore them. but if you like writing code once, and having it run across all browsers, I'd recommend taking a look at their organization.

    Anyway, let's get back on topic.

  • #10
    New Coder
    Join Date
    Jul 2002
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well as far as I've seen, it take much less work in IE to write a document than it does in netscape. Now NS6/7 seems to be just as small so thats good. I have come across any compatibility problems in CSS between them so I'm happy. Anyway, it seems I'll just have to wait for Opera 7 for proper DOM support.
    - Maximus


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •