• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 434
  • Last Modified:

javascript for google chrome

Hey guys how can i write javascript code so it can work in google?

 "progid:DXImageTransform.Microsoft.RandomDissolve()";
"progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=20, Duration=2, Enabled=false)";
"progid:DXImageTransform.Microsoft.RadialWipe(wipeStyle='clock')";
"progid:DXImageTransform.Microsoft.Wheel(spokes=4)";
"progid:DXImageTransform.Microsoft.Stretch(stretchStyle='spin')";
"progid:DXImageTransform.Microsoft.Stretch(stretchStyle='push')";

 var photo = document.getElementById(imgID);
 photo.filters[0].apply();                    
photo.filters[0].play();                      
photo.src = img.src;  


i am making a slide show but this thing only work in IE
0
JCWEBHOST
Asked:
JCWEBHOST
  • 3
1 Solution
 
Gurvinder Pal SinghCommented:
what is it doing?
If you can explain the output you are seeing, it will save the analysis effort
0
 
JCWEBHOSTAuthor Commented:
it is a banner image slide show
0
 
JCWEBHOSTAuthor Commented:
//GET THE TRANSACTION

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)";
        }
    }

function ReceiveServerData(rValue)
        {
            //Receive server's response of a string rValue, which is prepared in the server's function
            //GetCallbackResult()
            var wds = rValue.split(";");
            //Assign the transition effect
            document.getElementById("ctl00_photo").style.filter = wds[1];
            //Preload the image file from server.  When finishing download, imageLoaded function will be called
            //with the img object as the argument                          
            var img  = new Image();
            img.onload = function(){ imageLoaded(this); }
            img.onerror = function(){ imageError(this); }
            img.onabort = function(){ imageError(this); }
            img.src = wds[0];                                            
        }
       
        function imageError(img)
        {
            //If image download errors occur, this function will be called.
            window.setTimeout("getNextImage()", 1000);
        }
       
       function imageLoaded(img)
        {
            var imgID = '<%= photo.ClientID %>';
            var photo = document.getElementById(imgID); //Find the image control object  
            photo.filters[0].apply();                       //Apply the transition effect
            photo.filters[0].play();                        //Play the effect and display the new image
            photo.src = img.src;                           //Assign the image to the image control
           
            window.setTimeout("getNextImage()", c_interval);//Initiate the next request
        }
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.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now