Heh, actually no, Javascript can't draw anything :P And Ajax is basically just a library for Javascript (not really, but that explanation will work), PHP can draw stuff with one of the image libraries, but passing JS to PHP is a pain, and slow.
But non-the-less, you actually gave me an idea...