yes you can.
<cfset variables.username = "Charlie" />
<script type="text/javascript">
<cfoutput>alert("#variables.username#");</cfoutput>
</script>
JS is read/interpreted by the browser, just the same as HTML. Just as
you can use CF to output/generate HTML, you can use it to
output/generate JS.
On 9/15/06, David S. Neuman <[EMAIL PROTECTED]> wrote:
> Hello,
>
>
>
> I have a question. Can you use cf tags inside of JavaScript?
>
>
>
> I'm trying to do something and it's not working quite right.
>
>
>
> Thanks
> --------------------------------------------------------
>
>
> David S. Neuman
> Developer
> 2081 Industrial Blvd
> StillwaterMN55082
> mail: [EMAIL PROTECTED]
> www: http://www.ejhassociates.com
> tel: 651.717.4106
> fax: 651.717.4116
> mob: 952.239.3990
>
> --------------------------------------------------------
>
> This message contains confidential information and is intended only for
> [EMAIL PROTECTED] If you are not [email protected] you should not
> disseminate, distribute or copy this e-mail. Please notify [EMAIL PROTECTED]
> immediately by e-mail if you have received this e-mail by mistake and delete
> this e-mail from your system. E-mail transmission cannot be guaranteed to be
> secure or error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. David S. Neuman
> therefore does not accept liability for any errors or omissions in the
> contents of this message, which arise as a result of e-mail transmission. If
> verification is required please request a hard-copy version.
> --------------------------------------------------------
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253317
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4