I have the following html file

<!DOCTYPE hmtl>
<html>
	<head>
		<title> Minimum Spec Test </title>
		<script src="Compatability.js"></script>
		<script type="text/javascript">
			var can, ctx;
			
			var img = new Image();
		
			function Init()
			{
				can = document.getElementById('canvas');
				can.width = 100;
				can.height = 400;
				
				ctx = can.getContext('2d');
				
				img.src = 'Images/_test.bmp';
				
				ctx.drawImage(img, 0, 0);
			}
		</script>
	</head>
	<body onLoad="Init()">
		<canvas id="canvas" style="border:1px solid #c3c3c3;">
		Your browser does not support the canvas tag.
		</canvas>
	</body>
</html>

Now this code works on ios safari 4.2 and later but i can't get it to work on ios safari 4.1. On 4.1 it displays the canvas but will not draw the image. The debug console shows no errors.

Is there anyway to get it to work, or is 4.2 the cut off point for even the most basic canvas operations?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.