|
-
Jan 28th, 2010, 05:15 AM
#1
Thread Starter
PowerPoster
Yahoo User Interface (YUI), saving div tag properties to database
I am not sure if anyone is using YUI out there, but I have a unique question that will prove quite useful for my customers.
Here is an example http://developer.yahoo.com/yui/examp...ut_source.html
I have a layout that has 4 divs on it. Like so....
Top
Center
Right
Bottom
The bottom is resizable up and down. When it is resized, the other areas grow and shrink with it. What I would like to know, which I can't seem to find out by looking thru the documents for YUI is, are there variables that I can pull that give the X,Y of each div?
I would like for my customers to be able to size the windows the way they want and when they log in the next time they will be in the same place they left them, if you know what I mean.
Thanks for any input.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Jan 28th, 2010, 12:44 PM
#2
Re: Yahoo User Interface (YUI), saving div tag properties to database
You can get the height of LayoutUnits with "layout.getSizes().left.h" where "layout" is the name of your Layout object, and "left" is the position of the LayoutUnit you want to get (can be changed to "top", "right", etc.). Then you could plug that height value back into the constructor on page load. As long as all the LayoutUnits position themselves with respect to each other, you won't need their exact X/Y positions, just widths and heights.
As mentioned in another thread, I don't know YUI, but gathered that from the documentation. So, hopefully it's useful.
Last edited by SambaNeko; Jan 28th, 2010 at 12:48 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|