Welcome Guest Search | Active Topics | Sign In | Register

Location of dialog Options
Tomas
Posted: Monday, August 27, 2007 12:00:03 PM

Rank: Member
Groups: Member

Joined: 7/9/2007
Posts: 10
Hi,

We are creating a site where we need to be able to store the locations of the open dialogs on the screen. We plan to do this by saving all the dialog´s locations in the asp_net profile.
In order to do this we need to be able to fetch the current location of all dialog on the screen.
We have checked the online documentation to find a client APi in the dialog to retreive the x and y location.
Is this possible, or do you have an alternative on how we should do this?

eo_support
Posted: Monday, August 27, 2007 1:07:09 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi Tomas,

There is no direct support on this, one way you can do it is by dealing with the DHTML directly:

Code: JavaScript
var element = document.getElementById("dialog1");
var x = element.offsetX;
var y = element.offsetY;


Such code will give you the location of the dialog relative to its first positioned parent element. You can then save it on your server side. When you need to apply these values again on the server side, set the dialog's AnchorElementID, OffsetX and OffsetY property. Note you may need to adjust the value that you get from client side based on which element you use for anchor.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.