I\'m just sounding things out about this having looked around for a while and drawn a blank. I\'d like to see if this is even possible as so far I can\'t see a way to do it.
You can't do this with JavaScript. You can, of course, simply use SSL (e.g., via HTTPS). Dead easy, well-tested, all of that. Otherwise, you'll have to use something non-standard like Flash, Java, or ActiveX.