How can i call a function defined in my masterpage from radwindow

1 posts, 0 answers
  1. Peter
    Peter avatar
    1 posts
    Member since:
    Jan 2014

    Posted 08 Nov Link to this post

    I have a masterpage where a have defined a function below

     function PopUpShowing(sender, eventArgs) {
                    var popUp = eventArgs.get_popUp();
                    var scrollTop = (typeof window.innerHeight != 'undefined' ? 0 : document.documentElement.scrollTop);
                    var popUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf("px"));
                    var popUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px"));
                    var windowHeight = (typeof window.innerHeight != 'undefined' ? window.innerHeight : document.body.offsetHeight - scrollTop);
                    var windowWidth = document.body.offsetWidth;
                    if (popUpHeight == "") popUpHeight = 300; // if the height isn't set on the popup, default to 300px 
                    popUp.style.position = "fixed";
                    popUp.style.left = (Math.floor((windowWidth - popUpWidth) / 2)).toString() + "px";
                    popUp.style.top = (Math.floor((windowHeight - popUpHeight) / 4) + scrollTop).toString() + "px";
                }

    Then i have i page that opens a radwindow on button click. The radwindow contains a radgrid that has a popup editing set. So i want to call the PopUpShowing function in the masterpage to display the popup.

Back to Top