coldfusion - cfscript language="javascript" does not work - Stack Overflow

Here is my code:<cfscript language="javascript">OpenText(document.getElementById(#url.i

Here is my code:

<cfscript language="javascript">
      OpenText(document.getElementById(#url.id#));
</cfscript>

Here is the error:

Invalid token l found on line 731 at column 19.

The CFML piler was processing:

A cfscript tag beginning on line 731, column 10.

Why?

Here is my code:

<cfscript language="javascript">
      OpenText(document.getElementById(#url.id#));
</cfscript>

Here is the error:

Invalid token l found on line 731 at column 19.

The CFML piler was processing:

A cfscript tag beginning on line 731, column 10.

Why?

Share Improve this question edited Dec 4, 2012 at 16:18 Leigh 28.9k10 gold badges57 silver badges109 bronze badges asked Dec 4, 2012 at 9:43 Chani PozChani Poz 1,4632 gold badges21 silver badges47 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 11

<cfscript> doesn't take a language attribute. You are probably just wanting to do:

<script type="text/javascript">
<cfoutput>
OpenText(document.getElementById(#url.id#));
</cfoutput>
</script>

Incidentally, the language attribute is also deprecated on the <script> tag in HTML 4, and you should use type instead (as in my example). In HTML5 you can just do <script> without either language or type attributes.

OpenBD supports this apparently, but ColdFusion does not.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742307577a4419248.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信