Results 1 to 8 of 8

Thread: JavaScript for Opera

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Anyone know of any good documentation on what Opera supports as far as ECMAScript, JavaScript, DOM, and DHTML?

    I have a document that was built for viewing with IE 5. I have been able to scale it back for IE 4 and am working on compliance with Navigator 4 (using the DynEl API in the Rhino book).

    Regretably the 3rd Ed of the Rhino came out in '98. It doesn't even mention Opera, and as far as I know, there isn't a newer edition.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    http://www.opera.com/opera5/specs.html

    Try here and see if that saysa what you are llokng for. Whats Rhino? Never heared of that.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Yeah, Cander, Opera's web site is the only thing I have so far. Just wondering if anyone else knew of any other doco, particularly anything that compared Opera's JavaScript support to Navigator's and IE's, and a list of which elements I can use what with.

    I haven't gotten around to trying to use Opera, yet, though. I'm having problems with setBody in the DynEl API. When published code doesn't work, it is very discouraging.

    The Rhino book is the O'Reilly JavaScript book by David Flanagan. Perhaps the JavaScript crowd doesn't dub the book as such. Working with Perl (and being able to identify with the Perl mindset so much easier than the JavaScript one) I'm used to calling the books by what is on the cover. The Camel book, the Llama book. Though... I don't see many people call it the Ram book. We just call that one the cookbook.

    Anyway, Rhino book is shorter than O'Reilly's JavaScript book.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    oh ok..thought Rhino my have been a language or something. There are some links on this page t soe ECMAScript info. Check those out and see if you can find anything

    http://www.webstandards.org/ecma.html
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Thanks. I'll have a look at that.

    Any idea how to get at all of the HTML in a Navigator document layer? With IE, you just ask for document.all.innerHTML. That is so simple. I can't find a way to access the HTML with Navigator.

    The reason I'm asking about that is I'm trying to append to a document element. If you use write or writeln, it will clear the element before it writes (open will clear it, too). So if I can get the HTML, open the element, rewrite the old HTML and then write the new HTML and then close it, I will be fine. I can do this for IE.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    havent found an answer for that yet, but Ill see if I can come up with something. Doesnt seem to be any NATIVE get source function, but there may be some work around.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Well, while we are having fun...

    Code:
    <head>
    
    <script language='JavaScript' src='DynEl.js'></script>
    
    <script language='JavaScript'>
    
      var table1 = " "
      var table2 = "<table border='1'><TR><TD>test</TD><TD>data</TD></TR><TR><TD>data</TD><TD> </TD></TR></TABLE>"
    
      var dynel1 = new DynEl(window, "d1", table1);
      var dynel2 = new DynEl(window, "d2", table2);
    
    </script>
    
    </head>
    
    <body onload='JavaScript:Init();'>
    
    <a href="JavaScript:Toggle('1');">Show 1</a>
    <a href="JavaScript:Toggle('2');">Show 2</a>
    
    <script language='JavaScript'>
      dynel1.output();
      dynel2.output();
    </script>
    
    <script language='JavaScript'>
      dynel1.appendBody("blah");
      dynel1.appendBody("foo", "bar");
    </script>
    
    <script language='JavaScript'>
    
      function Init() {
        Toggle('1');
      }
    
      function Toggle(index) {
    
        index = parseInt(index);
    
        dynel1.hide();
        dynel2.hide();
    
        if (index == 1) {
          dynel1.show();
        }
        else if (index == 2) {
          dynel2.show();
        }
    
      }
    
    </script>
    
    </body>
    This uses the DynEl API from the Rhino book (attached). I've added the append method, and I'm trying to get that to work, but I've run across another problem.

    The above works well in IE. It doesn't work in Navigator. Now... I know appendBody() doesn't work because I haven't found a way to do that. Right now I've just copied the code from setBody(), but that is all beside the point, just imagine that appendBody() works.

    What is not working in Navigator is the fact that these lines:

    Code:
      dynel1.appendBody("blah");
      dynel1.appendBody("foo", "bar");
    are not in a function. If I wrap them in a function and call that function, they work, but with them as they are, they don't!!!

    ***?
    Attached Files Attached Files
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  8. #8
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Mark
    -------------------

Posting Permissions

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



Click Here to Expand Forum to Full Width