This is the strangest thing.
Here is my test code
[HTML]<HTML>
<HEAD>
<script type="applicati on/x-javascript">
<!--
function myc()
{ document.write( "hello 3<BR>");
}
function myb()
{ document.write( "hello 2<BR>");
}
function mya()
{ document.write( "hello 1<BR>");
}
function main()
{
// mya();
// myb();
myc();
document.write( "hello world<BR>");
}
// -->
</script>
</HEAD>
<BODY onload="main(); ">
</BODY></HTML>
[/HTML]
This outputs a page with "hello 3" and "hello world" on it
but if I uncomment mya() as well I only get "hello 1" and am told that myc is not defined
Stranger still is that if I then comment out myc() I get both "hello 1" and "hello world"
Can any one shed some light on this puzzle?
Here is my test code
[HTML]<HTML>
<HEAD>
<script type="applicati on/x-javascript">
<!--
function myc()
{ document.write( "hello 3<BR>");
}
function myb()
{ document.write( "hello 2<BR>");
}
function mya()
{ document.write( "hello 1<BR>");
}
function main()
{
// mya();
// myb();
myc();
document.write( "hello world<BR>");
}
// -->
</script>
</HEAD>
<BODY onload="main(); ">
</BODY></HTML>
[/HTML]
This outputs a page with "hello 3" and "hello world" on it
but if I uncomment mya() as well I only get "hello 1" and am told that myc is not defined
Stranger still is that if I then comment out myc() I get both "hello 1" and "hello world"
Can any one shed some light on this puzzle?
Comment