views:

555

answers:

3

Hello Friends,

I want to position Dojo's Dijit Dialog relative to one of my html element. is it Possible? If yes. How?

currently it always shows dialog in middle of viewport.

Can any one help me regarding the matter?

Thanks.

amar4kintu

A: 

I think dijit.TooltipDialog is what you need.

Kniganapolke
A: 

I did that by adjusting default absolute position of dijit.dialog using dojo..

I used following code to readjust absolute position of dialog to what I want..

dijit.byId('dialog').show();

dojo.style('dialog','background-color','#AAAAAA');

var co = dojo.coords('period'); // element below which I want to display dialog

dojo.style('md1','top',(co.y + 25)+'px');
dojo.style('md1','left', co.x+'px');

Hopefully this will help someone..

Thanks.

amar4kintu

amar4kintu
A: 

Thank you amar4kintu!

Suddenly my dialogs weren't centered anymore, after I had scrolled vertically (in IE7). I don't know exactly how your code works, but it does. And never change a winning team... :)

sincerely, Rob Mies

Rob Mies
This should be a commnet
the_drow