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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ames, IA, USA
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opera Compatibility Problem

    I have a script which works with IE 5.0+ and Netscape 6.0+ but chokes Opera 6.0.

    Here's the line in question:
    Code:
    nsStyleSheet=document.styleSheets[0];
    Opera claims that the lefthand operand cannot be assigned the value of the righthand operand.

    I'm at a loss for a solution.

    Note: I do not declare the variable before making the assignment, if that would make a difference.
    Need more emoticons?
    Visit Catman's Private Stock

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Newcastle, England
    Posts
    178
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Does Opera support the stylesheets collection? Try opening the following in your Opera browser.

    <html>
    <head>
    <script type="text/javascript">
    if(document.styleSheets){ alert( "yes")}
    </script>
    </head>
    </html>

    patrick

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ames, IA, USA
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yep, that's the problem.

    Oh, well, at least it degrades nicely to a styleless page after the script fails.
    Need more emoticons?
    Visit Catman's Private Stock


  •  

    Posting Permissions

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