Tails
11-04-2003, 03:23 AM
I have a form on a page. When I change the value in the text field, the page remembers it when I refresh.
<form>
<form action="javascript:set()">
<input type="text" size="1" maxlength="1" />
x
<input type="text" size="1" maxlength="1" value="4" />
<p></p>
</form>
<script>
alert(document.forms[0][0].value)
</script>
The field starts out blank and the script alerts a blank box. But when I change the value and then refresh, I still get a blank box yet the value stays. The value isn't filled in until after the page is done loading. Is there a way to get this alert to go after it fills the value in? Or am I left with using cookies and storing variables in the url to keep a value?
<form>
<form action="javascript:set()">
<input type="text" size="1" maxlength="1" />
x
<input type="text" size="1" maxlength="1" value="4" />
<p></p>
</form>
<script>
alert(document.forms[0][0].value)
</script>
The field starts out blank and the script alerts a blank box. But when I change the value and then refresh, I still get a blank box yet the value stays. The value isn't filled in until after the page is done loading. Is there a way to get this alert to go after it fills the value in? Or am I left with using cookies and storing variables in the url to keep a value?