• GoDaddy Community
  • Websites + Marketing | Website Builders
  • Websites + Marketing | Website Builders

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution

    Changing Dimensions of Embeded HTML Plugin Window- GoCentral

    So I'm fairly new to Website building and HTML.  I need to post this full page plug-in onto one of our web pages.  I originally just cut and paste the HTML code into the body as directed and it worked, but it has a scroll window and will not auto-adjust to full screen.  I even set the dimension to a larger size, but the plugin stays the same.  

     

    I did try to manually insert height and width code, but it did not change the size of the plug in.  Any advice here would be greatly appreciated.  Here is the code I'm using, and a screen shot of what it looks like.

     

    Thanks,

    Brendan

     

    <!DOCTYPE html>
    <html>
    <head>

    </style>
    <script src="https://myservicecloud.net/js/plugin/msc-alt-search-plugin.js"></script>
    div {

        height: 200px;

        width: 50%;

       

    }

    </style>
    </head>

    <body>
    <div id="msc-search-plugin" data-msc-type="resi" data-akey="warQNID_yGx40fgpLgOGdy5R4uPBVEWg" data-new-window="0" data-background-style="" data-akey-color-override="" data-hide-title="" data-hide-cr="" data-show-switch=""></div>

     


    </body>

    </html>

    Resi portal capture.PNG

    2 REPLIES 2
    Employee
    Employee
    Solution

    Re: Changing Dimensions of Embeded HTML Plugin Window- GoCentral

    Hi,

     

    We embed all HTML code in an iframe, but your embed script is also using an iframe. So you have an iframe within an iframe, and this is what is causing the scrollbar.  If the height of your iframe’s parent code is set to the correct height, the scrollbar will disappear. You can add a script to your embed code to change the height of the element. Below is a suggested way to reformat your embed code to force the iframe height and remove the scrollbar. Consider that for this particular widget, the starting-state height is short, then when the results are displayed the height gets taller. So you can play around with the height setting and find what works best.


    <script src="https://myservicecloud.net/js/plugin/msc-alt-search-plugin.js" onload="(function() {
    var adjustHeight = function() {
    console.log(document.getElementById(`myservicecloudOverscroll`));
    document.getElementById(`myservicecloudOverscroll`).style.height = `400px`;
    }
    document.body.onload = adjustHeight;
    })()">
    </script>
    <div id="msc-search-plugin" data-msc-type="resi" data-akey="warQNID_yGx40fgpLgOGdy5R4uPBVEWg" data-new-window="0" data-background-style="" data-akey-color-override="" data-hide-title="" data-hide-cr="" data-show-switch=""></div>

     

    Thanks for reaching out!

    Rachel

    Re: Changing Dimensions of Embeded HTML Plugin Window- GoCentral

    Brilliant! Thanks so much, and now I understand why it wasn't working right.  HUGE help!