JCWEBHOST
asked on
javascript for google chrome
Hey guys how can i write javascript code so it can work in google?
"progid:DXImageTransform.M icrosoft.R andomDisso lve()";
"progid:DXImageTransform.M icrosoft.P ixelate(Ma xSquare=20 , Duration=2, Enabled=false)";
"progid:DXImageTransform.M icrosoft.R adialWipe( wipeStyle= 'clock')";
"progid:DXImageTransform.M icrosoft.W heel(spoke s=4)";
"progid:DXImageTransform.M icrosoft.S tretch(str etchStyle= 'spin')";
"progid:DXImageTransform.M icrosoft.S tretch(str etchStyle= 'push')";
var photo = document.getElementById(im gID);
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
"progid:DXImageTransform.M
"progid:DXImageTransform.M
"progid:DXImageTransform.M
"progid:DXImageTransform.M
"progid:DXImageTransform.M
"progid:DXImageTransform.M
var photo = document.getElementById(im
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
//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,tr ansition=" + n.ToString() + ")";
case 2:
case 3:
if (Request.Browser.Browser == "IE")
{
n = (int)((new Random().NextDouble()) * 8);
switch (n)
{
case 0:
return "progid:DXImageTransform.M icrosoft.R andomDisso lve()";
case 1:
return "progid:DXImageTransform.M icrosoft.P ixelate(Ma xSquare=20 , Duration=2, Enabled=false)";
case 2:
return "progid:DXImageTransform.M icrosoft.R adialWipe( wipeStyle= 'clock')";
case 3:
return "progid:DXImageTransform.M icrosoft.W heel(spoke s=4)";
case 4:
return "progid:DXImageTransform.M icrosoft.S tretch(str etchStyle= 'spin')";
default:
return "progid:DXImageTransform.M icrosoft.S tretch(str etchStyle= '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("c tl00_photo ").style.f ilter = 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("getNext Image()", 1000);
}
function imageLoaded(img)
{
var imgID = '<%= photo.ClientID %>';
var photo = document.getElementById(im gID); //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("getNext Image()", c_interval);//Initiate the next request
}
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,tr
case 2:
case 3:
if (Request.Browser.Browser == "IE")
{
n = (int)((new Random().NextDouble()) * 8);
switch (n)
{
case 0:
return "progid:DXImageTransform.M
case 1:
return "progid:DXImageTransform.M
case 2:
return "progid:DXImageTransform.M
case 3:
return "progid:DXImageTransform.M
case 4:
return "progid:DXImageTransform.M
default:
return "progid:DXImageTransform.M
}
}
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("c
//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("getNext
}
function imageLoaded(img)
{
var imgID = '<%= photo.ClientID %>';
var photo = document.getElementById(im
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("getNext
}
ASKER
thanks
ASKER