locked
CRM 2011: HTML5 RRS feed

  • Question

  • Hi

    I tried for a long time now to succeed in getting HTML5 as a webressoucre to work in CRM 2011, without any luck.

    Has anyone made it work?

    What I am trying is really simple. I'm trying to use some code from w3schools:

    <!DOCTYPE html>
    <html>
    <body>
    <canvas id="myCanvas" width="200" height="100" style="border:1px solid #d3d3d3;">
    Your browser does not support the HTML5 canvas tag.</canvas>
    <script>
    var c=document.getElementById("myCanvas");
    var ctx=c.getContext("2d");
    // Create gradient
    var grd=ctx.createLinearGradient(0,0,200,0);
    grd.addColorStop(0,"red");
    grd.addColorStop(1,"white");
    // Fill with gradient
    ctx.fillStyle=grd;
    ctx.fillRect(10,10,150,80);
    </script>
    </body>
    </html>

    I inserted this into a webressource in CRM 2011 and afterwards tried to hook it up on the Account form. The only thing it shows me is the text: "Your browser does not support...."

    Im using IE9 as a browser so that should be ok.

    When I try to look at the code in the webressource afterwards it comes up with the known error: "Object dosesnt support method getContext..." and if I just cancel the popup error and looks at the code, CRM has change the HTML tag to normal HTML.

    I tried to export the file, edit it and import it again, with no luck.

    SO HAS ANYONE MADE IT WORK IN CRM 2011?

    Thursday, November 1, 2012 11:52 AM

Answers

  • Hi,

    it looks like it is not possible to use HTML 5 in a web resource that is embedded in a Dynamics CRM form yet. If you try opening the web resource in its own stand alone window in Dynamics CRM, you will see that it works without a problem.

    When embedded in a form though, you can see in the page source code (using IE developer tools) that the "DOCTYPE" section has been automatically commented out.

    So, I'm guessing that this scenario is not supported yet. I haven't found any documentation about this though.

    Greetings,

    Pavlos


    Please mark this reply as an answer and vote it as helpful if it helps you find a resolution to your problem.
    View my latest gallery contribution here.
    Visit my blog here.

    • Marked as answer by Casper Schau1 Friday, November 2, 2012 11:51 AM
    Friday, November 2, 2012 11:33 AM

All replies

  • hi,

    no it will not work now.

    may be HTML5 will be available in CRM r8 release


    Please don't forget to Vote and marked as answer If this post answers your question or was helpful, please click "Mark As Answer" on the post and "Mark as Helpful" Be wise

    Thursday, November 1, 2012 1:10 PM
  • ehm RU 8 has been out for several months now!?
    Thursday, November 1, 2012 1:17 PM
  • this is not Rool up 8

    am saying nest release of CRM..in it we can use HTML 5


    Please don't forget to Vote and marked as answer If this post answers your question or was helpful, please click "Mark As Answer" on the post and "Mark as Helpful" Be wise

    Thursday, November 1, 2012 4:26 PM
  • In your <head>, insert the following:

    <meta charset="UTF-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

    By default, CRM pages are loaded in IE8 Standards Document Mode. Let me know if you have any questions.

    Thanks,

    Ray

    Thursday, November 1, 2012 7:06 PM
  • Ty for taking your time helping me, but it still dosent work.

    This is what I got now:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    </head>
    <body>
    <canvas id="myCanvas" width="200" height="100" style="border:1px solid #d3d3d3;">
    Your browser does not support the HTML5 canvas tag.</canvas>
    <script>
        var c = document.getElementById("myCanvas");
        var ctx = c.getContext("2d");
        // Create gradient
        var grd = ctx.createLinearGradient(0, 0, 200, 0);
        grd.addColorStop(0, "red");
        grd.addColorStop(1, "blue");
        // Fill with gradient
        ctx.fillStyle = grd;
        ctx.fillRect(10, 10, 150, 80);
    </script>
    </body>
    </html>


    Friday, November 2, 2012 7:50 AM
  • Hi,

    it looks like it is not possible to use HTML 5 in a web resource that is embedded in a Dynamics CRM form yet. If you try opening the web resource in its own stand alone window in Dynamics CRM, you will see that it works without a problem.

    When embedded in a form though, you can see in the page source code (using IE developer tools) that the "DOCTYPE" section has been automatically commented out.

    So, I'm guessing that this scenario is not supported yet. I haven't found any documentation about this though.

    Greetings,

    Pavlos


    Please mark this reply as an answer and vote it as helpful if it helps you find a resolution to your problem.
    View my latest gallery contribution here.
    Visit my blog here.

    • Marked as answer by Casper Schau1 Friday, November 2, 2012 11:51 AM
    Friday, November 2, 2012 11:33 AM