empegVNC is already browser-capable. Not to discourage you from developing what you want, but there's little point in reinventing the wheel, unless you want to.
_________________________
Bitt Faulk