Staggan
08-24-2010, 10:43 AM
Hello
I have a php page in which I declared a js variable... right at the top of the page...
<script type="text/javascript">
var tester = 0;
</script>
Later in the page I test this variable...
<script type="text/javascript">
if (tester==1){
do some stuff!!
}
</script>
But I keep getting an error variable _tester undefined
Am I missing something obvious... I am new to js... but this seems really straightforward
I have a php page in which I declared a js variable... right at the top of the page...
<script type="text/javascript">
var tester = 0;
</script>
Later in the page I test this variable...
<script type="text/javascript">
if (tester==1){
do some stuff!!
}
</script>
But I keep getting an error variable _tester undefined
Am I missing something obvious... I am new to js... but this seems really straightforward