I'm not sure why you get a blank page.  

<script>
    <cfoutput>
        document.write('#JSStringFormat(now())#');
    </cfoutput>
</script>

writes a timestamp to the page for me.

as far as including CF code in a .js file..yes, you should be able to include a line of code like:
<script src="" type="text/_javascript_"></script>

and if test.cfm has the following code:
<cfoutput>
    document.write('#JSStringFormat(now())#');
</cfoutput>

you should get the same timestamp written to the calling page.

did i understand your question(s) right?

Charlie

  ----- Original Message -----
  From: Ketan Patel
  To: CF-Talk
  Sent: Friday, November 07, 2003 11:48 AM
  Subject: RE: _javascript_ CF question

  Hi Charlie,
  My caller page has following code

  Test110.cfm code
  <script type="text/_javascript_"  language="_javascript_1.2"
  src="">   </script>

  and Test111.cfm code is
  <cfoutput>
       document.write('#JSStringFormat(now())#');
  </cfoutput>

  nothing comes blank. Now my question is can I call a extrnal .cfm page using
  _javascript_ when I rename to .js and throw in bunch of text it works, I have
  seen php scripts doing this.

  Ketan Patel
  G3 Technology Group, LLC
  Graphics III Advertising, Inc.
  (410)789-7007 or (800)783-1799
  "It's Not Creative if it doesn't Sell."
  http://www.g3group.com <http://www.g3group.com>

    -----Original Message-----
    From: Charlie Griefer [mailto:[EMAIL PROTECTED]
    Sent: Friday, November 07, 2003 1:34 PM
    To: CF-Talk
    Subject: Re: _javascript_ CF question

    <cfoutput>
         document.write('#JSStringFormat(now())#');
    </cfoutput>

    http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funct148.htm

    hth,
    Charlie

      ----- Original Message -----
      From: Bert Dawson
      To: CF-Talk
      Sent: Friday, November 07, 2003 11:19 AM
      Subject: RE: _javascript_ CF question

      What do you see if you browse to http://www.mysite.com/test111.cfm and
  view the source?
      Is it all valid js?
      e.g. example becomes:
      document.write('{ts '2003-11-07 18:15:34'}');
      and js ain't gonna like all those apostrophes...

      Bert

      > <script type="text/_javascript_"  language="_javascript_1.2"
      > src="">
      > test111.cfm does not works
      >
      > <!-- Begin
      >
      > document.write('<cfoutput>#now()#</cfoutput>');
      >
      > // End -->


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to