i found out that the document.getElementById() is not working.Can anyone help me with this.Please try the below given code and tell me if it works.The rest of the tags are working except for the getElementById thing.
Your script tag is inside body and before input tag. So when it tries to execute it does not find that id. If you execute in IE, with display notification with every script error option enabled, it should an error that id not found. It should come after input tag is placed.