【问题标题】:ColdFusion Uncaught SyntaxError: Invalid or unexpected token jQueryColdFusion Uncaught SyntaxError:无效或意外的标记 jQuery
【发布时间】:2020-10-14 13:50:23
【问题描述】:

我收到以下控制台错误

(未捕获的 SyntaxError:无效或意外令牌)

在我的暂存环境中,但不在我的 DEV 或 TEST 环境中。有任何想法吗?我完全被难住了。

    <script>
            $(document).ready(function(){
            $.sessionTimeout({
                warnAfter: 1500000, // 5000 (10 seconds) | 1500000 (25 minutes)
                redirAfter: 1800000, // 15000 (20 seconds) | 1800000 (30 minutes)
                Line Highlighted --- > keepAliveUrl: '[URL.Path]/keepalive.cfm',
                logoutUrl: '[URL.Path]/logout.cfm',
                redirUrl: '[URL.Path]/logout.cfm?sessiontimeout=[URL.Path]/removeddashboard.cfm%3F',
                countdownMessage: 'Your session will expire in {timer}',
                message: 'Please be advised that per OIMT guidelines, sessions of inactivity for applications can be no longer than 30 minutes.'
                });
            });
            </script>

另外,有谁知道为什么浏览器会切断字符串并将其分成两行,这可能是问题吗??

【问题讨论】:

  • 如果您使用 CDN,您的登台环境可能在 VPN 内没有输出到 Internet
  • 您的结果与预期不符 - 使用浏览器上的网络选项卡来确定返回的确切内容 - 它可能是 HTML 错误页面。
  • “网络”选项卡中没有任何内容。
  • 另外,有谁知道为什么浏览器会切断字符串并将其分成两行,这可能是问题吗??
  • 去掉换行符后发生了什么?

标签: jquery coldfusion coldfusion-11


【解决方案1】:

我将 URL 设置为相对路径以使其更短,并且错误问题消失了。

【讨论】:

    猜你喜欢
    • 2020-07-12
    • 2017-09-29
    • 2018-12-03
    • 2021-08-14
    • 1970-01-01
    • 2017-01-22
    • 1970-01-01
    • 2015-12-02
    • 1970-01-01
    相关资源
    最近更新 更多