hi just got a quick question. im learning html and javascript at the moment so please help if u can.
i have a javascript input box asking for a name.
<script type="text/javascript">
function promptWindow()
{
var myText = "Your name is " + window.prompt("Your Name:", "name ");
document.getElementById("myBody").appendChild(document.createTextNode(myText));
}
</script>
once this name is entered and the user presses OK, this name is displayed at the very bottom of the page as : Your name is (name entered)
I have actually created a button and by clicking it, I would like it to give me the name recently entered into that input box. How would I go about doing this?
Many thanks for your help.




