Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Image Opacity

 
Jay Damon
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I inherited the following JavaScript method to set the opacity for images in IE. However, apparently if the image does not have an initial style similar to style="filter:alpha(opacity=100)", the code will not work as a result of the if statement on line 8. Is there a way to create an initial style in JavaScript if one does not exists?

 
Jay Damon
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JavaScript code is:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic