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
  1. #1
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,966
    Thanks
    0
    Thanked 236 Times in 233 Posts

    style.display in Opera

    i've got div tags with display:none and with a click on a link, i change the display to empty. it doesn't work and when i alert(obj.style.display) just before i set it, the error says undefined. the variable obj is an object pointing to a div. i thought Opera doesn't support the display property but the fact that the div's are not displayed on load of the page with initial value 'none', it supports display property.

    so how can i programmatically set the 'display' property in Opera? Im using Opera 6.05

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,966
    Thanks
    0
    Thanked 236 Times in 233 Posts
    anybody knows the solution?

  • #3
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72 W. 48' 57" , 41 N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    to the best of my knowledge, opera doesn't support display.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,966
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Originally posted by joh6nn
    to the best of my knowledge, opera doesn't support display.
    but why the div's are not displayed when display:none?
    this means it recognized the property 'display'.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Opera does recognise display as an initial property, which is why it works, but you cannot modify its value after its been set

  • #6
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,966
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Originally posted by brothercake
    Opera does recognise display as an initial property, which is why it works, but you cannot modify its value after its been set
    even just reading its value?
    well, if that's the case, Opera needs an operation
    is it the same with visibility property?

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    Newcastle, England
    Posts
    178
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Opera has some unusual features, one of which is the ability to change how it identifies itself to the server. In the preferences menu you can set it to identify as Opera, as Mozilla or as Internet Explorer. If you choose the latter then it will happily implement document.all. If you choose the former two options it will not.

    weird!

    patrick

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by glenngv
    is it the same with visibility property?

    No, visibility works fine. Changing the identity setting won't affect whether this works or not - you should never use document.all for opera, because it only works in "MSIE" emulation mode - you can't control which mode the user has set, therefore always use the DOM methods for accessing objects.

    Opera 7 is much better ... just have to wait for that

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    Newcastle, England
    Posts
    178
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you should never use document.all for opera, because it only works in "MSIE" emulation mode - you can't control which mode the user has set, therefore always use the DOM methods for accessing objects.

    I agree brothercake, which is why I can't understand why they included this strange feature in Opera.

    patrick

  • #10
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think because many people, although not so much anymore, makes sniffer scripts that check for IE or Netscape and redirect all others to one of those stupid "please upgrade your browser" pages - the emulation gets round that, so that Opera is able to run the script anyway ... even though it may still not work correctly.

    I agree it's counterproductive in the long run, but I sympathise with Opera for doing this, otherwise they may never have been able to acheive any kind of inroads


  •  

    Posting Permissions

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