Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Change WebExplorerBar height client side
posted

Hi all,

is there a way to change the height of a WebExplorerBar control client side when user is resizing the browsers window (window.onresize event)?

Here is a snipped of code i've tried (without success)

                    var explorerbar = document.getElementById('ctl00_cphRight_webRight');
                        
                    if (explorerbar != null)
                        explorerbar .style.height = iContentHeight;

Thanks

Dom

  • 3726
    posted

    Yes you can.

    First options is like you already pointed out: document.getElementById("...") will return the main control DIV html element. Then you can adjust the height by using div.style.height = "200px";

    The other option is:

    If you have explorer bar java script object instance like:

     var control = $find("WebExplorerBar1");

    if(!$util.isNullOrUndefined(control))

      control.get_element().style.height = "200px";

    where get_element() will return the main HTML element of the control. i.e. the DIV in our case.

     

    Hope this helps.