|
I wasn't aware that the width is not available when the object is not visible. Perhaps you could move the object off the screen (some negative position), make it visible, get the width and then move it to where you want it. >>> [EMAIL PROTECTED] 07/10/06 9:21 AM >>> Hi
Thanks JAVA Mad.
clientWidth also returns a zero value.
Here is a more detailed version of my code.
this .layer = document.createElement("div");this.layer.id = "wpDropMenuCtrl"; this.layer.className = this .menuClass; // Create Content (Items) var sHtml = "<ul id='wpDropMenuCtrlList'>" ; for (var i=0; i < menuItems.length; i++) {
var myArray = menuItems[i].split(SEP); sHtml = sHtml + this.buildListItem(myArray[0], myArray[1]); } sHtml = sHtml + "</ul>"; this.layer.innerHTML = sHtml; this.layer.style.visibility = "visible"; Before I set the the div to be visible. I need to know what the width of my div will be and set the "offsetTop" and "offsetLeft". The reson for this is if my div is to close to the right of the screen it must then display towords the left of the screen. Unfortunitly i dont know what the contnat of my menu is going to be until it is displayed so i cant set the width before hand as it could be of any width depending on the data that is recived from the server.
Maby i should do this in another way to solve my problem any help?
thank you
On 10/07/06, Java Mad <[EMAIL PROTECTED]> wrote:
-- Regards, Ryan Meder
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CTJUG Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/CTJUG-Forum For the ctjug home page see http://www.ctjug.org.za -~----------~----~----~----~------~----~------~--~--- |
- [CTJUG Forum] Width of dynamically created div menu popup Ryan Meder
- [CTJUG Forum] Re: Width of dynamically created div menu ... Java Mad
- [CTJUG Forum] Width of dynamically created div menu popu... Paul Gilowey
- [CTJUG Forum] Width of dynamically created div menu popu... Paul Gilowey
