mxAjax - closing a DomInclude from within the popup window

The mxAjax DomInclude (http://www.indiankey.com/mxajax/examples/mxDomInclude1.cfm) automatically provides a way to close the popup content (by clicking the link used to open it). However you might wish to have a link inside the popup that closes the DomInclude.

When you create the DomInclude, keep the created object:

function init() {
myDomInclude = new mxAjax.DomInclude( {source:"testlink"});
}

addOnLoadEvent(function() {init();});

Then in your included content, refer to the object you just created:

<a href="#" onclick="parent.myDomInclude.killPopup('external');">close</a>

Related Blog Entries

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.