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
455
WebDialogWindow in Ascx user control inside a webtab
posted

I am trying to get a reference to a web dialog window located on an ascx page loaded into a tab. In javascript I tried everything I know and still the object returned is not a web dialog window. Any help?

 Tried all of these

dialogWindowID = "ctl00_mainPageContent_UltraWebTab1__ctl4_ctl00_WebDialogWindow1"

var dialog1 = $get(dialogWindowID);

var dialog2 = igtab_getElementById(dialogWindowID);
       
var webTab = igtab_getTabById("ctl00_mainPageContent_UltraWebTab1");
if(webTab != null)
{
  var dialog3 = webTab.findControl(dialogWindowID); 

 

Parents
No Data
Reply
  • 24497
    posted

    Hi,

    To get reference to any "javascript" object like WebDialogWindow regardless where it is located, you should use its objects, but not its parent.
    For example, if you need its id, then you may process ClientEvents.Initialize="initCtrl":

    var globalRefToDialog = null;
    function initCtrl(sender, args)
    {
      globalRefToDialog = sender;
     
    //alert(sender.get_id());
    }

Children
No Data