0

After the app menu html is retrieved, it is displayed as text instead of html. Chrome complains Resource interpreted as Script but transferred with MIME type text/plain. I'm using MVC on the Force.com platform. I've tried specifying the content type of the response as "text/html" and "application/javascript", but neither worked.

[EDIT 1]

Code

<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>

When dropdown is open, code is added at arrow location as string and a class 'open' is addedto #intuitPlatformAppMenuLogo.

Image

Blue dot menu code appears as string

[EDIT 2]

Server side apex code

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() returns the response body and saves it to response which is then rendered on the page.

geeljire
  • 226
  • 3
  • 9

2 Answers2

2

This issue arises from Visualforce's default rendering of strings as escaped. To fix it, the apex:outputText attribute escaped needs to be "false". See http://bit.ly/13CSXve

geeljire
  • 226
  • 3
  • 9
0

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

For IE8, you should add (as mentioned in the above doc)

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

You can clear the browser's cache and try it again. Plz let me know how it goes.

Thanks

Manas Mukherjee
  • 5,270
  • 3
  • 18
  • 30
  • Unfortunately, it's still the same. Please see code and image above. – geeljire Jul 18 '13 at 13:44
  • If possible, plz share the code behind 'https://c.na55.visual.force.com' [ ie menuProxy URL ] – Manas Mukherjee Jul 18 '13 at 14:32
  • Can you please test your code with just ? It should work. If it does not work then you can refer to other solutions in SO like this one for Force registry key entry similar to Visual Studio: http://stackoverflow.com/questions/12003107/resource-interpreted-as-script-but-transferred-with-mime-type-text-plain-for-l – nimisha shrivastava Jul 18 '13 at 14:52