R
Richard
<div id="right" >
<script type="text/javascript">
if (IsThis)
document.write('<img src="images/foo.gif" />');
else
{
document.write('<div id="too_right"><scr' + 'ipt type="text/
javascript" src="http://external.com/script.js"></scr' + 'ipt></
div>');
}
</script>
</div>
Now here's the good part: http://external.com/script.js returns (wait
for it) 'document.write("<img src="..." />");'
This actually works, except that it acts like I have put in <br/>
elements. The <img> is top-aligned (good) but the image returned by
the script.js is pushed to the bottom, AND (worse) the whole <div>
height is increased, pushing all the later elements on the page down.
Does the legacy of write() imply a newline at the end?
If CSS is the answer, I would prefer not trying to position the
"right" div; trying to restrain the height would be easier.
<script type="text/javascript">
if (IsThis)
document.write('<img src="images/foo.gif" />');
else
{
document.write('<div id="too_right"><scr' + 'ipt type="text/
javascript" src="http://external.com/script.js"></scr' + 'ipt></
div>');
}
</script>
</div>
Now here's the good part: http://external.com/script.js returns (wait
for it) 'document.write("<img src="..." />");'
This actually works, except that it acts like I have put in <br/>
elements. The <img> is top-aligned (good) but the image returned by
the script.js is pushed to the bottom, AND (worse) the whole <div>
height is increased, pushing all the later elements on the page down.
Does the legacy of write() imply a newline at the end?
If CSS is the answer, I would prefer not trying to position the
"right" div; trying to restrain the height would be easier.