<script language="Javascript"> <!-- // please keep these lines on when you copy the source // made by: Nicolas - http://www.javascript-page.com function initArray() { this.length = 3 this[0] = "Nic's" this[1] = "Javascript" this[2] = "Page" this[3] = "at" this[4] = "http://www.javascript-page.com" } var homepage = new initArray() //--> </script> <form name="list" method="post"> Type in an integer between 1 and 5: <input name="myinput" type="text" size=2,1 value="5"><br> <br> The word: <input name="hpage" type="text" size=30,1 value= "--Not entered in yet--"><br> <br> <input type="button" value="Enter it in" onClick="document.list.hpage.value= homepage[document.list.myinput.value-1]"> </form>