0
![Stack Overflow](http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png)
Something like this should work, the two functions combined ;)
<script>
window.onload = function() {
$.ajax({
type: "POST",
url: "retrieve.php",
succes: function( data ) {
var canvas=document.getElementById("drawing"); // grabs the canvas element
...