Announcement

Collapse
No announcement yet.

Log Out Effects

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Log Out Effects

    The Grayscale effect is cool on logout...if you have IE. Can we make the Function Firefox and Opera friendly? (Function is in the vbulletin_global.js file)

    Code:
    Function log_out(confirmation_message)
    {
       var ht = document.getElementsByTagName("body")[0];
       ht.style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
       ht.style.MozOpacity = '0.3';
       ht.style.opacity = '0.3';
       If (confirm(confirmation_message))
       {
          Return true;
       }
       Else
       {
          ht.style.filter = "";
          ht.style.MozOpacity = '1';
          ht.style.opacity = '1';
          Return false;
       }
    }
    
    Last edited by Roger Garstang; 31 Oct 2007, 02:48 PM.
    sigpic
    Mobile Solutions
    Sys Analyst and Development

  • #2
    Maybe in the future we will modify the templates to support this other browsers, but not at the moment. I have been testing with this code

    HTML Code:
    <script type="text/javascript" language="JavaScript">
    <!--
    function log_out()
    {
      bo = document.getElementsByTagName('body');
      bo[0].style.filter = 'Alpha(opacity="30")';
      bo[0].style.MozOpacity = '0.3';
      bo[0].style.opacity = '0.3';
    
      if (confirm('$vbphrase[sure_you_want_to_log_out]'))
      {
        return true;
      }
      else
      {
        bo[0].style.filter = 'Alpha(opacity="100")';
        bo[0].style.MozOpacity = '1';
        bo[0].style.opacity = '1';
    
        return false;
      }
    }
    //-->
    </script>
    Sincerely,

    Steve Rossell
    PowerBASIC Staff

    Comment


    • #3
      Everything else seems to work fine. I had been using Firefox forever and recently had to switch to IE and noticed the grayscale that I hadn't seen before. The function you posted is the one I modeled from that is on various sites. I tested some scenerios and the main things making it work is the Element name of "body" instead of "html" as it deosn't seem to work with "html", and the other style types that are standard where M$'s style isn't...technically I guess the Moz styles aren't standard either, but including them all makes everyone happy. Other than that, I liked the grayscale in IE better than alpha, so kept the grayscale for it only.

      And, the code you posted and that I used/saw on sites I thought was weird in it specifies Javascript, yet tries using a $vbphrase??? I like the way the function on the forum now passes a string, it makes it more reusable and doesn't mix vb and java script.
      Last edited by Roger Garstang; 31 Oct 2007, 03:43 PM.
      sigpic
      Mobile Solutions
      Sys Analyst and Development

      Comment


      • #4
        I like the vbphrase variable as it lets me change this phrase in one central location that effects this variable everywhere on the board. Not really sure where else this phrase it used, but it keeps thing symmetrical for me.
        Sincerely,

        Steve Rossell
        PowerBASIC Staff

        Comment

        Working...
        X