javascript

Hey guys i have a javascript that changes images in my website but the transactions affects do not work in google chrome.

can some please help apply some affects to my image while it changes?

here my java code (some of the code)

 function imageLoaded(img)
        {
            var browser=navigator.appName;

            if (browser=="Microsoft Internet Explorer")
              {
                var imgID = '<%= photo.ClientID %>';
                var photo = document.getElementById(imgID);
                photo.filters[0].apply();                    
                photo.filters[0].play();                      
                photo.src = img.src;                          
           
                window.setTimeout("getNextImage()", c_interval);
            }
            else
            {
                var imgID = '<%= photo.ClientID %>';
                var photo = document.getElementById(imgID);
                photo.src = img.src;                          
           
                window.setTimeout("getNextImage()", c_interval);
            }
        }


Here my c# code:

 private string GetNextTransition()
    {
        int n = (int)((new Random().NextDouble()) * 5);
        switch (n)
        {
            case 0:
            case 1:
                n = (int)((new Random().NextDouble()) * 22);
                return "revealTrans(duration=2,transition=" + n.ToString() + ")";
            case 2:
            case 3:
                if (Request.Browser.Browser == "IE")
                {
                    n = (int)((new Random().NextDouble()) * 8);
                    switch (n)
                    {
                        case 0:
                            return "progid:DXImageTransform.Microsoft.RandomDissolve()";
                        case 1:
                            return "progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=20, Duration=2, Enabled=false)";
                        case 2:
                            return "progid:DXImageTransform.Microsoft.RadialWipe(wipeStyle='clock')";
                        case 3:
                            return "progid:DXImageTransform.Microsoft.Wheel(spokes=4)";
                        case 4:
                            return "progid:DXImageTransform.Microsoft.Stretch(stretchStyle='spin')";
                        default:
                            return "progid:DXImageTransform.Microsoft.Stretch(stretchStyle='push')";
                    }
                }
                else
                    return "blendTrans(duration=2)";
            default:
                return "blendTrans(duration=2)";
        }
    }
JCWEBHOSTAsked:
Who is Participating?
 
Tom BeckConnect With a Mentor Commented:
If you need cross-browser compatibility, obviously, you'll never get it by using Microsoft transition effects. I think the better approach might be to go with a jquery plug-in like this one:

http://workshop.rs/projects/jqfancytransitions/

...but that's just the first one that popped up in a Google search.
0
 
JCWEBHOSTAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.