[thelist] Re: cfhtmlhead tag
jeff
jeff at members.evolt.org
Wed Jul 19 21:47:51 CDT 2000
david,
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: "David Shadovitz" <david_shadovitz at xontech.com>
:
: You might find it difficult to put complex strings in the TEXT
: attribute; you'll have to escape quotes, and you won't be able
: to have line breaks.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i don't know what problems dave watts has experienced, but i do this all the
time:
from an actual file, picked at random:
<cfhtmlhead text="
<script language=""JavaScript"" type=""text/javascript"">
<!--
var IE4 = (document.all) ? true : false;
var NN4 = (document.layers) ? true : false;
function sizeScrollableDiv()
{
if(IE4)
{
if(content.clientHeight > 300)
{
document.all.content.style.height = 300;
document.all.content.style.overflow = 'scroll';
}
}
}
function init()
{
sizeScrollableDiv;
getDimensions;
}
window.onload = init;
// -->
</script>
">
no problems with linebreaks and all i had to do was escape the double-quotes
by doubling them up. as i rarely have double-quotes in my <script> blocks
(except for the attributes and their values in the <script> tag itself) this
is quite readable for me and does what i need it to without the additional
overhead of processing a custom tag.
good luck,
.jeff
name://jeff.howden
game://web.development
http://www.evolt.org
jeff at members.evolt.org
More information about the thelist
mailing list