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 6 of 6
  1. #1
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts

    .style works in FF but not IE

    This piece of code works in FF
    Code:
    firstSelectedDiv.style.opacity = '0.5';
    How come it wont work in IE7?

    I have tried looking it up but i cant find any answers or help, probably because im not typing it in correctly.

    Thanks for any help.
    Last edited by jcdevelopment; 06-18-2008 at 04:07 PM.

  • #2
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts
    I was able to find this also. It doesnt work for IE, it just sends an error

    Code:
    secondSelectedDiv.style.filter = 'alpha(opacity='50')';
    Still cant seem to find out whats wrong

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Quote Originally Posted by jcdevelopment View Post
    I was able to find this also. It doesnt work for IE, it just sends an error

    Code:
    secondSelectedDiv.style.filter = 'alpha(opacity='50')';
    Still cant seem to find out whats wrong
    May be an issue with escaping quotes, try
    Code:
    secondSelectedDiv.style.filter ="alpha(opacity='50')";
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    jcdevelopment (06-18-2008)

  • #5
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts
    That worked, it took me while to figure out the alternative JS for FF but i got it, thanks for letting me know anyways.

  • #6
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,374
    Thanks
    11
    Thanked 592 Times in 572 Posts
    Quote Originally Posted by abduraooft View Post
    Want to quickly point out that firefox uses the regular "opacity: 0.5" as well. Use MozOpacity only when you don't want transparency in safari and opera.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%


  •  

    Posting Permissions

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