codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Preferred layer size  Nille at 11:06 on Sunday, May 21, 2006
 

Hi!

I need to find the preferred or minimum size of an arbitrary DHTML element. For example:


var offset = 0;

for(var i = 0; i < numberOfChildLayer; i++)
{
var layer = getLayer(i);
with(layer.style)
{
left = 0;
top = offset;
width = preferredWidth;
height = preferredHeight;
}

offset += preferredHeight;
}



So if a div contains a text element, (preferredWidth, preferredHeight) would denote the bounds of the label.

Ideas?

Thanks in advance,
Nille








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: $var .= $_; what it mean?
•  Re: Help: Trouble with z-Index and SELECT lists
•  Dynamic crystal report formatting
•  URL rewriting doesnt seem to work with xml sitemap provider and menus
•  This code is not working
•  Re: doubt in asp.net
•  Scraping, Pulling, Calculating, and Displaying
•  Re: How to open a MS Word document from Javascript
•  session time out


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2006