I have a Dojo dialog that is opened when a user clicks on an element on the page.
I want control the location it opens at ....really I want it to open beside (relative to) the other dom element clicked on.
But I can seem to figure out how to do either of the above.
Thank for any advice.
I have a Dojo dialog that is opened when a user clicks on an element on the page.
I want control the location it opens at ....really I want it to open beside (relative to) the other dom element clicked on.
But I can seem to figure out how to do either of the above.
Thank for any advice.
Share Improve this question asked Jun 18, 2012 at 4:03 Gern BlanstonGern Blanston 42.7k19 gold badges52 silver badges64 bronze badges2 Answers
Reset to default 3Open an dialog with dojo relative to click position:
dojo.style(pointDialog.domNode, 'visibility', 'hidden');
pointDialog.show().then(function () {
dojo.style(pointDialog.domNode, 'top', clickEvt.pageY);
dojo.style(pointDialog.domNode, 'visibility', 'visible');
});
The visibility trick is needed for dialog not hop
I'd take a loot at the Tooltip
doc for Dojo. I've never had experience with Dojo, but here are some links that should help you get started.
Dojo Dijit Dialog relative position. is it possible?
http://livedocs.dojotoolkit/dijit/TooltipDialog
http://mail.dojotoolkit/pipermail/dojo-interest/2011-May/054581.html