I have a textfield in HTML, where the value is predefined, e.g. "hello".
Now I change the value manually on my website from "hello" to "bye". When I click on a button, that calls the same site again, my value of the input type should be "bye" now and not "hello". Here you can see my code :
<form method="POST" id="ReloadPage" name="ReloadPage" action="MyWebsite" onsubmit="getValue();">
<strong>word: </strong>
<input id="word" type="text" size="30" value="hello" name="WORD" />
<script type="text/javascript">
function getValue() {
document.getElementById("word").value="bye";
}
</script>
But somehow, the value will always be hello and doesn't change to bye. Thanks a lot for help.