You are here: irt.org | FAQ | JavaScript | Form | Q1456 [ previous next ]
Perhaps the browser does not have time to render it. Try this instead:
<form name="form1"> <input type="text" name="test1"> </form> <script language="JavaScript"><!-- function f_start() { j=0; //setting form field before loop document.form1.test1.value="Counting"; setTimeout('longLoop()',10); } function longLoop() { for (i=0; i<=1000000; i++,j++) ; } //--</script>