Click here to Skip to main content
15,906,558 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: First VS2005 and MS Access Web Project Pin
Vasudevan Deepak Kumar18-Dec-07 4:57
Vasudevan Deepak Kumar18-Dec-07 4:57 
GeneralRe: First VS2005 and MS Access Web Project Pin
jszabo18-Dec-07 12:52
jszabo18-Dec-07 12:52 
GeneralRe: First VS2005 and MS Access Web Project Pin
Mark Churchill18-Dec-07 14:59
Mark Churchill18-Dec-07 14:59 
GeneralRe: First VS2005 and MS Access Web Project Pin
jszabo20-Dec-07 0:37
jszabo20-Dec-07 0:37 
GeneralApp_Code in Web Application Pin
DotNetXenon17-Dec-07 10:51
DotNetXenon17-Dec-07 10:51 
GeneralRe: App_Code in Web Application Pin
jchalfant17-Dec-07 16:19
jchalfant17-Dec-07 16:19 
GeneralFavored solution to IE dropdown shortcomings Pin
jchalfant17-Dec-07 10:03
jchalfant17-Dec-07 10:03 
GeneralChanging opacity with javascript Pin
chaddolan17-Dec-07 9:55
chaddolan17-Dec-07 9:55 
Hello all,

I was wondering how to change the opacity of an image tag in Firefox, Opera, and Safari with a javascript. I figured out how to do it in IE. I also know that the style for the opacity is opacity or -moz-opacity. It works with IE but not in the other browsers. I believe that it should work but I must be missing something. So if anyone could take a look at this and see if you could find what I am over looking.

Thanks
Chad Dolan

Here is the script I wrote.

var current;
var interval;
var newImage = new Image();
var browser = navigator.appName;
var b_version = navigator.appVersion;
var version = parseFloat(b_version);
function fade(id, new_src)
{
current = document.getElementById(id);
newImage.src = new_src;
if(browser == "Microsoft Internet Explorer")
{
interval = setInterval("makeFadeOutIE()", 10);
}
else
{
interval = setInterval("makeFadeOutOther()", 10);
}
}
function makeFadeOutIE()
{
if(current.filters.alpha.opacity > 0)
{
current.filters.alpha.opacity = current.filters.alpha.opacity - 5;
}
else
{
if(window.interval)
{
clearInterval(interval);
current.src = newImage.src;
interval = setInterval("makeFadeInIE()", 10);
}
}
}
function makeFadeInIE()
{
if(current.filters.alpha.opacity < 100)
{
current.filters.alpha.opacity = current.filters.alpha.opacity + 5;
}
else
{
if(window.interval)
{
clearInterval(interval);
}
}
}
function makeFadeOutOther()
{
if(current.style.opacity > 0)
{
current.style.opacity = current.style.opacity - .05;
}
else
{
if(window.interval)
{
clearInterval(interval);
current.src = newImage.src;
interval = setInterval("makeFadeInOther()", 10);
}
}
}
function makeFadeInOther()
{
if(current.style.opacity < 1)
{
current.style.opacity = current.style.opacity + .05;
}
else
{
if(window.interval)
{
clearInterval(interval);
}
}
}
GeneralRe: Changing opacity with javascript Pin
Michael Sync18-Dec-07 16:24
Michael Sync18-Dec-07 16:24 
GeneralRe: Changing opacity with javascript Pin
chaddolan19-Dec-07 2:16
chaddolan19-Dec-07 2:16 
QuestionDownloading a file using InternetOpenUrl in proxy environment (VC++ Wininet Library) Pin
Ravi Jadhav17-Dec-07 2:51
Ravi Jadhav17-Dec-07 2:51 
GeneralImage and text not displaying correctly in a <li> tag</li> Pin
Brendan Vogt17-Dec-07 2:41
Brendan Vogt17-Dec-07 2:41 
GeneralRe: Image and text not displaying correctly in a tag Pin
Fred_Smith17-Dec-07 10:33
Fred_Smith17-Dec-07 10:33 
QuestionRe: Image and text not displaying correctly in a tag Pin
Brendan Vogt19-Dec-07 4:35
Brendan Vogt19-Dec-07 4:35 
GeneralRe: Image and text not displaying correctly in a tag Pin
Fred_Smith19-Dec-07 4:48
Fred_Smith19-Dec-07 4:48 
AnswerRe: Image and text not displaying correctly in a tag Pin
Brendan Vogt19-Dec-07 5:37
Brendan Vogt19-Dec-07 5:37 
GeneralAdding a new report to an ASP Page Pin
Member 470022517-Dec-07 1:47
Member 470022517-Dec-07 1:47 
GeneralDate time picker in jsp Pin
w20916-Dec-07 18:09
w20916-Dec-07 18:09 
GeneralRe: Date time picker in jsp Pin
Michael Sync18-Dec-07 16:20
Michael Sync18-Dec-07 16:20 
GeneralInteract with webpage programatically [modified] Pin
Sumanth Pereji16-Dec-07 17:20
Sumanth Pereji16-Dec-07 17:20 
GeneralRe: Interact with webpage programatically Pin
Michael Sync18-Dec-07 16:19
Michael Sync18-Dec-07 16:19 
Questionhow can do mathmetical calculation in asp Pin
idsanjeevjha16-Dec-07 15:39
idsanjeevjha16-Dec-07 15:39 
GeneralRe: how can do mathmetical calculation in asp Pin
techieboi16-Dec-07 18:21
techieboi16-Dec-07 18:21 
GeneralRe: how can do mathmetical calculation in asp Pin
Alaric_18-Dec-07 12:01
professionalAlaric_18-Dec-07 12:01 
GeneralRe: how can do mathmetical calculation in asp [modified] Pin
idsanjeevjha19-Dec-07 17:53
idsanjeevjha19-Dec-07 17:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.