Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old February 7th, 2008, 06:55 AM   #1
New Member
 

Join Date: Oct 2007
Location: UK
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 djeyewater is on a distinguished road
IE not setting opacity correctly

Following on from another thread in this forum I am trying to make a slideshow with a fade in/out effect. In some versions of IE I have tested it is not working properly: IE 6 and IE 7.0.5730.11IC. In 7.0.5730.11 and 7.0.6000.16575 it works okay.

To see the problem please see http://www.iliveinabin.com/SlideShow...howV3Pics.html. Wait for the daffodil pic to load then click on the lock picture. It should fade in the lock pic and the daffodil turns nearly transparent (it's meant to be totally transparent). If you don't get this problem please refresh the page and try again, or wait for another pic to load and then click on the lock again, the problem doesn't happen everytime, which makes it even weirder.

Now, if you look at the code for the page, you should see that once the lock image has faded in after you click on it the function slideshow() will trigger, which sets the opacity of the previous image displayed (the daffodil in this example) to 0% and the current image (the lock) to 100%. I have put a div in the page that tells you the images that have just had their opacity set to 0% and 100%. You can also click the 'clicky' link in top left corner to check opacity of all current images. If you do this when the problem occurs you will see that the opacity of the daffodil has not been set to zero and is about 13% and the lock's opacity is not 100%, only about 89%.

I can bodge round this problem by setting the image style.display = "none" at the same time as setting opacity to 0, which gets rid of the 13% opaque daffodil, but the lock image would still be only 89% opaque.

I have spent about 3 days trying to find out why this happening and how to fix it, but I can't figure it out. Is it something wrong with my code or is it a bug in IE?
djeyewater is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 7th, 2008, 10:57 AM   #2
Reputable Member
 

Join Date: Nov 2007
Location: India
Posts: 150
Blog Entries: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 RohanShenoy is on a distinguished road
Re: IE not setting opacity correctly

I think for IE, you have to use the alpha thing. Please follow below link.
http://www.quirksmode.org/css/opacity.html
RohanShenoy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 7th, 2008, 03:05 PM   #3
New Member
 

Join Date: Oct 2007
Location: UK
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 djeyewater is on a distinguished road
Re: IE not setting opacity correctly

I'm already using the alpha filter to set opacity in IE
djeyewater is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 8th, 2008, 04:46 AM   #4
Reputable Member
 

Join Date: Nov 2007
Location: India
Posts: 150
Blog Entries: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 RohanShenoy is on a distinguished road
Re: IE not setting opacity correctly

Did you see at some of the 'Similar threads' below?
RohanShenoy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old February 8th, 2008, 05:57 AM   #5
New Member
 

Join Date: Oct 2007
Location: UK
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 djeyewater is on a distinguished road
Re: IE not setting opacity correctly

I just checked the similar threads, but there wasn't any posts to explain the behaviour I am seeing with my script. I have written a new version of my script now so it doesn't have this problem, but would still like to know why this example doesn't work.
djeyewater is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
css-opacity MotorManiac HTML, XHTML and CSS 5 April 16th, 2008 04:16 AM
css opacity effect RZX Developer HTML, XHTML and CSS 6 August 7th, 2007 03:05 PM
Opacity jonnymorris HTML, XHTML and CSS 8 July 24th, 2007 05:02 PM
CSS opacity works in FF but not IE? WebNinja HTML, XHTML and CSS 5 February 25th, 2007 06:14 PM
Weird Opacity behavior in PS 7 autumn_whispers2me Graphic Specifics 0 May 3rd, 2005 06:24 PM


Search Engine Optimization by vBSEO 3.2.0 RC8