opacity in javascript

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Oct 2009
Posts: 18
Reputation: rudz is an unknown quantity at this point 
Solved Threads: 0
rudz rudz is offline Offline
Newbie Poster

opacity in javascript

 
-1
  #1
Nov 6th, 2009
document.getElementById(fadeImageID).style.opacity is working in firefox but its not working in ie
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 348
Reputation: Troy III will become famous soon enough Troy III will become famous soon enough 
Solved Threads: 42
Troy III's Avatar
Troy III Troy III is offline Offline
Posting Whiz
 
-1
  #2
Nov 6th, 2009
so what?
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 17
Reputation: futingkiller is an unknown quantity at this point 
Solved Threads: 2
futingkiller futingkiller is offline Offline
Newbie Poster
 
-1
  #3
Nov 6th, 2009
Originally Posted by rudz View Post
document.getElementById(fadeImageID).style.opacity is working in firefox but its not working in ie

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <script>
  2. function lightup(imageobject, opacity){
  3. if (navigator.appName.indexOf("Netscape")!=-1&&parseInt(navigator.appVersion)>=5)
  4. imageobject.style.MozOpacity=opacity/100
  5. else if (navigator.appName.indexOf("Microsoft")!=-1&&parseInt(navigator.appVersion)>=4)
  6. imageobject.filters.alpha.opacity=opacity
  7. }
  8.  
  9. </script>
  10. <img src="test.gif" style="filter:alpha(opacity=50); -moz-opacity:0.5"
  11. onMouseover="lightup(this, 100)" onMouseout="lightup(this, 30)">
try the code above, if that doesn't help try:
http://www.akxl.net/labs/articles/us...html-entities/
Last edited by futingkiller; Nov 6th, 2009 at 1:24 pm.
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 460 | Replies: 2
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC