PDA

View Full Version : Logout grayscale function


teonix
06-30-2005, 08:36 AM
Hello,

I'm trying to add the logout function to a non-vB page. The prompt part is working, but I cannot seem to get the grayscale part to work.

I am currently adding this code to my non-vB page..


<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grays cale=1)";
if (confirm('$vbphrase[sure_you_want_to_log_out]'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>

And then utilizing the function in the logout <a href> by adding


onclick="return log_out()"


The javascript prompt pops up, but the page doesn't convert to grayscale like it does on a vB page :(

Any ideas? Is there something i'm missing that I need to include?

Colin F
06-30-2005, 10:29 AM
Hello,

I'm trying to add the logout function to a non-vB page. The prompt part is working, but I cannot seem to get the grayscale part to work.

I am currently adding this code to my non-vB page..


<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grays cale=1)";
if (confirm('$vbphrase[sure_you_want_to_log_out]'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>

And then utilizing the function in the logout <a href> by adding


onclick="return log_out()"


The javascript prompt pops up, but the page doesn't convert to grayscale like it does on a vB page :(

Any ideas? Is there something i'm missing that I need to include?
Looks OK to me... This only works in Internet Explorer, so I assume you're not testing in FireFox or so?

teonix
06-30-2005, 03:11 PM
Correct, i'm testing it in Internet Explorer :)

any ideas?

BrentW
03-27-2006, 04:42 AM
Any idea on how to get this effect working in Firefox and Opera?

Not a big deal, but it would be nice.