> Were developing a rather large applciation/intranet where
> there is a fair bit of code in application.cfm and in header
> files and such. The <html><head> blah blah </head><body>
> section is in a file called dsp_header. In some pages, much
> of the javascript gets included with the form as a simple
> script block outside the <head></head> tags. Also, we've
> recently put some javascript code in the application.cfm
> file.
The short answer is, no, current browsers don't care where your JavaScript
is, as long as functions and objects are defined before they're referenced.
However, standards compliance is a good thing, all other things being equal,
and future browsers may care.
Fortunately, you can deal with this using the CFHTMLHEAD tag, which writes a
string to the HTML HEAD of the document. By itself, it's difficult to use
with strings containing JavaScript, so you can build yourself a little
four-line custom tag to automatically escape the strings:
<cfif ThisTag.ExecutionMode is "end">
<cfhtmlhead text="#ThisTag.GeneratedContent#">
<cfset ThisTag.GeneratedContent = "">
</cfif>
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists