<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Um, I guess that version of MGE didn't include the latest jxlib. &nbsp;Here is the implementation:<div><div><br></div><div>function $jx(id) {</div><div>&nbsp; var widget = null;</div><div>&nbsp; id = document.id(id);</div><div>&nbsp; if (id) {</div><div>&nbsp; &nbsp; widget = id.retrieve('jxWidget');</div><div>&nbsp; &nbsp; if (!widget &amp;&amp; id != document.body) {</div><div>&nbsp; &nbsp; &nbsp; widget = $jx(id.getParent());</div><div>&nbsp; &nbsp; }</div><div>&nbsp; }</div><div>&nbsp; return widget;</div><div>}</div><div><br></div><div>I am hopeful it would work with an older version of JxLib but it might not if your version of JxLib doesn't 'store' jxWidget on the element in which a widget is created. &nbsp;If it doesn't work, your best bet would be to assign a reference to your dialog in a global namespace from which you can access it in other code. &nbsp;You could prevent massive pollution by creating an object,</div><div><br></div><div>window.myStuff = {}</div><div><br></div><div><br></div><div>then where you create the dialog, use window.myStuff.myDialog = new Jx.Dialog( ... );</div><div><br></div><div>and where you want to collapse it, you can do window.myStuff.myDialog.toggleCollapse(); or some such.</div><div><br></div><div>Cheers</div><div><br></div><div>Paul</div><div><br></div><div><div>On 2011-10-06, at 12:43 PM, pwong wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>sorry Paul, it did not work. &nbsp;Firebug says "$jx is not defined".<br><br>Some more info on the problem.<br><br>What I have is a dialog that shows in the middle of the screen on top of the<br>map, after a search is performed, a list of records is displayed in that<br>dialog in a standard HTML table as content. &nbsp;When a user clicks on one of<br>the records, I want the dialog to automatically collapse itself so that the<br>user doesn't have to manually collapse the dialog to view the underlying<br>map. &nbsp;I'm using MapGuide Enterprise 2011's implementation of JxLib.<br><br>--<br>View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Reference-JxDialog-from-a-different-control-tp6845317p6866546.html">http://osgeo-org.1803224.n2.nabble.com/Reference-JxDialog-from-a-different-control-tp6845317p6866546.html</a><br>Sent from the Fusion Users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>fusion-users mailing list<br><a href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/fusion-users">http://lists.osgeo.org/mailman/listinfo/fusion-users</a><br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="font-size: 12px; "><div><font class="Apple-style-span" face="Monaco" size="2"><br class="Apple-interchange-newline">__________________________________________</font></div><div><font class="Apple-style-span" face="Monaco" size="2"><br class="webkit-block-placeholder"></font></div><div><font class="Apple-style-span" face="Monaco" size="2">&nbsp;&nbsp; Paul Spencer</font></div><div><font class="Apple-style-span" face="Monaco" size="2">&nbsp;&nbsp; Chief Technology Officer</font></div><div><font class="Apple-style-span" face="Monaco" size="2">&nbsp;&nbsp; DM Solutions Group Inc</font></div><div><font class="Apple-style-span" face="Monaco" size="2">&nbsp;&nbsp; <a href="http://research.dmsolutions.ca/">http://research.dmsolutions.ca/</a></font></div></span>
</div>
<br></div></body></html>