javascript - Why am I not able to use this script in dreamweaver -
i'm not able use code in php.. i'm using dreamweaver
{ <script language = "javascript"> var counter = 0; // call update function in 2 seconds after first load id = window . settimeout("update();", 2000); function update() { counter++; window.status = "the counter @ " + counter; document.form1.input1.value = "the counter @ " + counter; // set timeout next count id = window . settimeout("update();", 2000); } </script> }
you not outputting script: page needs have html content in execute javascript (by browser). echo script , go there.
<?php { echo'<script language = "javascript"> var counter = 0; // call update function in 2 seconds after first load id = window . settimeout("update();", 2000); function update() { counter++; window.status = "the counter @ " + counter; document.form1.input1.value = "the counter @ " + counter; // set timeout next count id = window . settimeout("update();", 2000); } </script>'; } ?>
Comments
Post a Comment