I got a question regarding my code. I got this function which opens a new window and creates a text input. Now I am trying to display the new entered text in the new window but unfortunately it does not work.. Thank you very much in advance
Text:
<input type="submit" value="Send" onclick="myAlert()">
<script>
function myAlert()
{
var NewWindow= window.open();
var nameValue = document.getElementById("vname").value;
NewWindow.document.write(nameValue);
var input = document.createElement("input");
input.type = "text";
var btn = document.createElement("BUTTON");
var t = document.createTextNode("Send");
NewWindow.document.body.appendChild(input);
btn.appendChild(t);
NewWindow.document.body.appendChild(btn);
}
</script>