All,
Below is the simple code that updates the field with input entered by the user. However, the updates are not taking place. Can anyone please let me know the issue here?
<html>
<head>
<title>Rooms</title>
<script type="text/javascript">
function populate()
{
var newName = document.getElementsByName("roomNameInput").value;
document.getElementsByName("nameDisplay").value = newName;
}
</script>
</head>
<body>
<h3>Configure: </h3><i name="nameDisplay"></i><br />
Enter the Room name: <input type="text" name="roomNameInput" onkeypress="populate()"><br />
</body>
</html>
tried with document.getElementsByName("nameDisplay").innerHTML but fails
HTML should be this
Javascript should be this:
Working fiddle http://jsfiddle.net/DarkThrone/B5LP7/