This is how I want the code to be. When you write any word it will automatically change to uppercase using onkeyup. Also when user clicks on new window, the uppercase letters will be shown in the new window. I can only do the first part. How do I do this? https://jsfiddle.net/p3zea7Lu/11/
<body>
<div>
<form>
<br /><br /> Type in your text: <br />
<p>
<input type="text" size="30" id="input" onkeyup="convertToUppercase()" />
</p>
<p id="output"></p>
</form>
<br />
<button onclick="myFunction()">Open new window</button>
</div>
<script>
function convertToUppercase() {
document.getElementById('output').innerHTML = document.getElementById('input').value.toUpperCase();
}
function myFunction() {
var myWindow = window.open("", "MsgWindow", "width=200,height=100");
myWindow.document.write("The word is:" + input);
}
</script>
</body>