We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,277 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

HTML5/ javascript ios compatability

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?

2
Contributors
1
Reply
1 Day
Discussion Span
1 Year Ago
Last Updated
2
Views
Question
Answered
MadSkyrim
Newbie Poster
9 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

maybe this site can help
http://www.mobilexweb.com/blog/safari-ios-accelerometer-websockets-html5

It's a user-made changelog of safari 4.2, so it's likely that whatever made your current code work is because of one of these changes.
If you can see it, you'll know what needs to be replaced :)

phoenix_2000
Junior Poster
143 posts since Sep 2011
Reputation Points: 40
Solved Threads: 16
Skill Endorsements: 0
Question Answered as of 1 Year Ago by phoenix_2000

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0985 seconds using 2.68MB