Click here to Skip to main content
15,914,500 members
Home / Discussions / Web Development
   

Web Development

 
GeneralIFrame Problem Pin
Dan Smith2-Jun-00 18:14
Dan Smith2-Jun-00 18:14 
GeneralSearching on a web page. please respond. very urgent Pin
Member 15022-Jun-00 3:31
Member 15022-Jun-00 3:31 
GeneralRe: Searching on a web page. please respond. very urgent Pin
Erik Thompson2-Jun-00 6:35
sitebuilderErik Thompson2-Jun-00 6:35 
QuestionAnyone Konw Of Any DHTML Bugs In IE5? Pin
Member 23951-Jun-00 21:12
Member 23951-Jun-00 21:12 
QuestionSize Of DIV Contents? Pin
Member 239531-May-00 21:39
Member 239531-May-00 21:39 
AnswerRe: Size Of DIV Contents? Pin
haykel1-Jun-00 4:12
haykel1-Jun-00 4:12 
GeneralRe: Size Of DIV Contents? Pin
Member 23951-Jun-00 10:48
Member 23951-Jun-00 10:48 
GeneralDHTML: Retrieving The Dimensions Of A DIV Container Pin
Member 239525-May-00 21:24
Member 239525-May-00 21:24 
Sorry, this is slightly lengthy to give all possible information.

I'm having difficulty retrieving the width and height (or anything, for that matter) from a block defined with a DIV. I predefined its position and size using the standard stylesheet approach, so it DEFINITELY has a position and size (and I can see it occupy those dimensions, so I know it works).

I am trying to get the size like this:

function GetDIVObject(strID)
{
var Object = null ;

switch (g_iBrowser) // Assume this is correctly set.
{
case BROWSER_IE :
Object = document.all[strID].style ;
break ;

... and other cases for other browsers, I'm using IE5...
}
}

var Object ;

Object = GetDIVObject("CategorySelect") // This name is OK
// The object returned is not null, as the browser is
// correctly recognised as IE.

I have tried:

iWidth = Object.width
iWidth = Object.posWidth
iWidth = Object.pixelWidth

but none of them return anything useful - the first returns blank or undefined, the others return 0.

The DIV block is defined not directly into an HTML page but
by document.writeln() statements creating the HTML lines - but this MUST work because I do see the created DIV (it contains a combo box). The call to get the size IS located AFTER the declaration of the DIV.

I am trying to do this so that I can centre the DIV in the available client space.

Any ideas?

GeneralRe: DHTML: Retrieving The Dimensions Of A DIV Container Pin
haykel25-May-00 22:34
haykel25-May-00 22:34 
GeneralRe: DHTML: Retrieving The Dimensions Of A DIV Container Pin
Member 239531-May-00 21:36
Member 239531-May-00 21:36 
GeneralRe: DHTML: Retrieving The Dimensions Of A DIV Container Pin
haykel1-Jun-00 1:51
haykel1-Jun-00 1:51 
GeneralRe: DHTML: Retrieving The Dimensions Of A DIV Container Pin
Member 23951-Jun-00 10:49
Member 23951-Jun-00 10:49 
GeneralRTF to TXT/HTML Pin
richard24-May-00 9:48
richard24-May-00 9:48 
GeneralSpecifying multiple "Actions" in a form Pin
Chris Maunder19-May-00 1:07
cofounderChris Maunder19-May-00 1:07 
GeneralRe: Specifying multiple Pin
Uwe Keim19-May-00 1:13
sitebuilderUwe Keim19-May-00 1:13 
GeneralRe: Specifying multiple Pin
Chris Maunder19-May-00 1:30
cofounderChris Maunder19-May-00 1:30 
GeneralRe: Specifying multiple Pin
Alex Gorev19-May-00 5:20
Alex Gorev19-May-00 5:20 
GeneralRe: Specifying multiple Pin
Chris Maunder19-May-00 17:10
cofounderChris Maunder19-May-00 17:10 
GeneralRe: Specifying multiple Pin
Tim Deveaux20-May-00 7:31
Tim Deveaux20-May-00 7:31 
GeneralRe: Specifying multiple Pin
Tim Deveaux20-May-00 9:58
Tim Deveaux20-May-00 9:58 
GeneralPrinting multiple pages on the Client Pin
Chris Losinger18-May-00 8:15
professionalChris Losinger18-May-00 8:15 
GeneralRe: Printing multiple pages on the Client Pin
haykel21-May-00 7:22
haykel21-May-00 7:22 
GeneralRe: Printing multiple pages on the Client Pin
Chris22-May-00 6:13
Chris22-May-00 6:13 
GeneralRe: Printing multiple pages on the Client Pin
haykel22-May-00 21:50
haykel22-May-00 21:50 
GeneralRe: Printing multiple pages on the Client Pin
Uwe Keim21-May-00 9:51
sitebuilderUwe Keim21-May-00 9:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.