Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Dynamically setting height on an HTML web resource

  • 1.  Dynamically setting height on an HTML web resource

    SILVER CONTRIBUTOR
    Posted 22 days ago
    Hi UG,

    We are looking to dynamically set the height of an HTML web resource in JS, on load of a form. This hack used to work but post switching to the UCI it doesn't...and neither does hardcoding height:

    window.onload = function () {

    document.getElementById("<name>").style.height = "10px";

    };

    The only conclusion we can draw is that in the new UI, setting DOM properties in JS is no longer possible.

    Would this be correct or are we missing something..?

    #CustomerEngagement


    ------------------------------
    Tamim Sadikali
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: Dynamically setting height on an HTML web resource

    SILVER CONTRIBUTOR
    Posted 21 days ago
    Try getting the attribute with "window.parent.Xrm.Page.getAttribute"

    I am not sure if that work for you but we use that in our existing html web resource.


    ------------------------------
    Lyrio Cristall Amurao
    Architect |Consultant
    North York
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role