S
Sean
Hi,
I have the following script:
-----------------------------------------------------------------------------------
<script type="text/javaScript">
<!--
document.write('<div id=hello1>Hello1</div>');
document.write('<div id=hello2 style="display:none;"><script
src="test.js"><\/script></div>');
//-->
</script>
where test.js contains one line: document.write("Hello2");
-----------------------------------------------------------------------------------
The intent is to only show the first div and hide the sencond div until late
to display if needed.
The result, however, shown both div contents.
If I change the script to:
-----------------------------------------------------------------------------------
<script type="text/javaScript">
<!--
document.write('<div id=hello1>Hello1</div>');
document.write('<div id=hello2
style="display:none>document.write("Hello2");(</div>');
//-->
</script>
-----------------------------------------------------------------------------------
It works fine.
If I further change it to:
-----------------------------------------------------------------------------------
<script type="text/javaScript">
<!--
document.write('<div id=hello1>Hello1</div>');
//-->
</script>
<script type="text/javaScript">document.write('<div id=hello2
style="display:none>');</script>
<script type="text/javaScript">document.write('<script
src="test.js"><\/script>');</script>
<script type="text/javaScript">document.write('</div>');</script>
-----------------------------------------------------------------------------------
it also works fine.
Any help is highly appreciated.
Sean
I have the following script:
-----------------------------------------------------------------------------------
<script type="text/javaScript">
<!--
document.write('<div id=hello1>Hello1</div>');
document.write('<div id=hello2 style="display:none;"><script
src="test.js"><\/script></div>');
//-->
</script>
where test.js contains one line: document.write("Hello2");
-----------------------------------------------------------------------------------
The intent is to only show the first div and hide the sencond div until late
to display if needed.
The result, however, shown both div contents.
If I change the script to:
-----------------------------------------------------------------------------------
<script type="text/javaScript">
<!--
document.write('<div id=hello1>Hello1</div>');
document.write('<div id=hello2
style="display:none>document.write("Hello2");(</div>');
//-->
</script>
-----------------------------------------------------------------------------------
It works fine.
If I further change it to:
-----------------------------------------------------------------------------------
<script type="text/javaScript">
<!--
document.write('<div id=hello1>Hello1</div>');
//-->
</script>
<script type="text/javaScript">document.write('<div id=hello2
style="display:none>');</script>
<script type="text/javaScript">document.write('<script
src="test.js"><\/script>');</script>
<script type="text/javaScript">document.write('</div>');</script>
-----------------------------------------------------------------------------------
it also works fine.
Any help is highly appreciated.
Sean