检索应用程序菜单html后,它将显示为文本而不是html。 Chrome抱怨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"> </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
,然后在页面上呈现。
答案 0 :(得分:2)
此问题源于Visualforce将字符串的默认呈现视为已转义。要修复它,apex:outputText属性escaped
必须为“false”。见http://bit.ly/13CSXve
答案 1 :(得分: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="">
您可以清除浏览器的缓存并再次尝试。 Plz让我知道它是怎么回事。
由于