0

检索到应用程序菜单 html 后,它显示为文本而不是 html。铬抱怨Resource interpreted as Script but transferred with MIME type text/plain。我在 Force.com 平台上使用 MVC。我尝试将响应的内容类型指定为“text/html”和“application/javascript”,但都没有成功。

[编辑 1]

代码

<script>
   intuit.ipp.anywhere.setup({
      menuProxy: "https://c.na55.visual.force.com/"
     + "apex/bluedot",
      grantUrl: "https://c.na55.visual.force.com/"
     + "apex/authpage"
   });
</script>

<ipp:bluedot>
    <div id="intuitPlatformAppMenu">
        <a id="intuitPlatformAppMenuLogo" href="javascript:void(0);" title="Intuit App Center">
            <span id="intuitPlatformAppMenuDot">&nbsp;</span>
        </a>
        <div id="intuitPlatformAppMenuDropdown" style="display: none;">
            <div id="intuitPlatformAppMenuDropdownTop"></div>
            <div id="intuitPlatformAppMenuDropdownInner">
                <<=======
            </div>
        </div>
    </div>
</ipp:bluedot>

当下拉菜单打开时,代码将作为字符串添加到箭头位置,并将类“open”添加到#intuitPlatformAppMenuLogo。

图片

蓝点菜单代码显示为字符串

[编辑 2]

服务器端顶点代码

public with sharing class GetBlueDotMenu {
    public String response {get; set;}
    public GetBlueDotMenu() {
        QbApiController api = new QbApiController ('GET', 'QB API' , null, null, 'https://appcenter.intuit.com/api/v1/Account/AppMenu');
        response = api.execute();
    }
}

api.execute() 返回响应正文并将其保存到response然后在页面上呈现。

4

2 回答 2

2

此问题源于 Visualforce 将字符串默认呈现为转义。要修复它,apex:outputText 属性escaped需要为“false”。见http://bit.ly/13CSXve

于 2013-07-19T00:01:47.407 回答
0

PFB 链接 - https://developer.intuit.com/docs/0025_quickbooksapi/0060_auth_auth/widgets/blue_dot_menu

对于 IE8,您应该添加(如上述文档中所述)

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ipp="">

您可以清除浏览器的缓存并重试。请让我知道情况如何。

谢谢

于 2013-07-17T04:33:59.370 回答