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
450
Running a function in Pane1 from Pane2
posted

How do you run a function in a websplitter?

I have a function in the page that is loaded in Pane1.

I want to run that function when a user clicks a button in Pane 2, how do I accomplish this?

 

I have attached a small project to show what I am looking for.

WebSplitter.zip
  • 450
    Verified Answer
    posted

    This is the fix that I got from Infragistics folks.  The help documentation and response time are painfully low so I will post the answer.

     

    var mainSplitter = parent.window.$find("WebSplitter1");
                if (mainSplitter != null) {
                    var panes = mainSplitter.get_panes();
                    var bodyPane = panes[0];
                    var resultVar = bodyPane.get_iframe();
                    var myFunctionResult= resultVar.contentWindow.MyFunction();
                  
                }

    You need to call use "contentWindow" in order to access any functions from the other pane.