Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (anonymous):

can you guys tell me why this codes do not show on internet explorer nor chrome?

OpenStudy (anonymous):

<html> <head> <title> Canvas Image Rotator Example</title> <script type="text/javascript"> var imagePaths = [ "C:\Users\garion\Desktop\New folder\a.jpg", "C:\Users\garion\Desktop\New folder\b.jpg", "C:\Users\garion\Desktop\New folder\c.jpg"]; var showCanvas = null; var showCanvasCtx = null; var img = document.createElement("img"); var currentImage = 0; var revealTimer; window.onload=function () { showCanvas = document.getElemntById('showCanvas'); showCanvasCtx = showCanvas.getContext('2d'); img.setAttribute('width','600'); img.setAttribute('height','400'); switchImage(); // start the animation setInterval(switchImage,3000); } function switchImage() { img.setAttribute('src',imagePaths[currentImage++]); if (currentImage >= imagePaths.length) currentImage = 0; showCanvasCtx. globalAlpha = 0.1; revealTimer = setInterval (revealImage,100); } function revealImage() { showCanvasCtx.save(); showCanvasCtx.drawImage(img,0,0,600,400); showCanvasCtx.globalAlpha +=0.1; if (showCanvasCtx.globalAlpha >= 1.0) clearInterval(revealTimer); showCanvasCtx.restore(); } </script> </head> <body> <canvas id='showCanvas' width='600' height='400'> Canvas Not Supported </canvas> </body> </html>

OpenStudy (e.mccormick):

Well, do you have that path on your machine?

OpenStudy (anonymous):

yeah I got that right

OpenStudy (anonymous):

I checked multiples of times

OpenStudy (anonymous):

What do you mean, not show up on your internet explorer

OpenStudy (e.mccormick):

Well, if nothing at all shows, it could be a script blocker or something wrong int he script. You may need a debugging tool like firebug to see what is happening.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!