If it's straight HTML and you have no ability to employ Server Side Includes, you can use a linked _javascript_ file.  I wrote a little utility that makes it easy to turn straight HTML into JS:

<cfparam name="a" default="">
<cfswitch _expression_="#a#">
<cfcase value="process">
<cfsavecontent variable="converted_js">
<cfloop index="i" list="#convert_string#" delimiters="#chr(13)##chr(10)#"><cfif len(trim(i)) GT 0>document.write('#jsstringformat(trim(i))#');
</cfif></cfloop>
</cfsavecontent>
<xmp>
#converted_js#
</xmp>
<cfheader name="content-disposition" value="filename=converted.js">
<cfcontent type="text/_javascript_">#converted_js#<cfabort>
</cfcase>
<cfdefaultcase>
  <h4>Enter the HTML that you want converted to _javascript_.</h4>

  <form action="" method="post">
   <input type="hidden" name="a" value="process">
   <textarea rows="25" cols="100" name="convert_string" style="width: 100%; height: 75%"></textarea>
   <div align="center"><input type="submit" value="Convert"> &nbsp; <input type="reset" value=" Reset "></div>
  </form>
</cfdefaultcase>
</cfswitch>

Pete
  ----- Original Message -----
  From: MILAN MUSHRAN
  To: CF-Talk
  Sent: Tuesday, March 23, 2004 8:25 AM
  Subject: Is this possible in HTML?

  Can i have an equivalent of "cfinclude" in a HTML file?

  Thanks,
  Milan
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to