AdvMesageBox Multiple content regions

Simply removing the line will prevent displaying the first ContentRegion control again if necessary.


You can add the following lines of code to make this work correctly:

     + 'function ' + HTMLName + 'Init(){'#13
    + 'var region = document.getElementById(' + HTMLName + 'ContentRegionID);'#13
    + 'if (region){'#13
    + '  el = document.getElementById("'+HTMLName+'ContentRegion");'#13
    + '  if (el){'#13

//    + '    ' + HTMLName + 'ContentRegionEL = region.innerHTML;'#13

    //enable changing the ContentRegion control using asynchronous events
    + '  if (' + HTMLName + 'ContentRegionEL != null) {'#13
    + '    ' + HTMLName + 'ContentRegionEL.style.visibility = "hidden";'#13
    + '    document.body.appendChild(' + HTMLName + 'ContentRegionEL);'#13
    + '  }'#13
    // * //

//    + '  if (' + HTMLName + 'ContentRegionEL == null)'#13
    + '    ' + HTMLName + 'ContentRegionEL = region;'#13

//    + '    el.innerHTML = region.innerHTML;'#13
//    + '    region.innerHTML = "";'#13
    + '    el.appendChild(' + HTMLName + 'ContentRegionEL);'#13
    + '    ' + HTMLName + 'ContentRegionEL.style.top = "0px";'#13
    + '    ' + HTMLName + 'ContentRegionEL.style.left = "0px";'#13

    + '    if (' + HTMLName + 'IsVisible) {'#13
    + '    ' + HTMLName + 'ContentRegionEL.style.visibility = "visible";'#13
    + '    } else {'#13
    + '    ' + HTMLName + 'ContentRegionEL.style.visibility = "hidden";'#13
    + '    }'#13

    + '    }'#13
    + '  }'#13
    + '}'#13;


This update will also be available with the next release of the TMS IW Component Pack.

Bart Holvoet2011-08-10 04:55:34