Html canvas not coming in

I have gone over multiple times this js…looks fine to me. & console is not giving any errors. is there a typo I am just blind to?
in the php

<canvas id="canvas1" class="canvas1" width="350" height="400">
						
						
						</canvas>

& the js

	window.onLoad= function(){
		var canEl = document.getElementById('canvas1');
		
		if(canEl && canEl.getContext){
			var ctx = canEl.getContext("2d");
			if(ctx){
				ctx.fillStyle = "#000";
				ctx.fillRect(0,0, ctx.canvas.width, ctx.canvas.height);
			}
		}
	}

This is a Javascript question. I moved it for you. Isn’t it onload not onLoad? For window.

Thank you that did it. You are right, changed it to onload & it worked.
D

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.