object width and browser compatibility

D

David McDivitt

At the URL http://www.spfldcycling.org/miles.htm , I'm having difficulty
resizing a DIV object when the window resizes. I want to get the left and
top positions of the DIV, then calculate the width and height. I can get the
window dimensions fine, but since I can't get the left and top I had to use
constants, which isn't a good idea. Also, the page doesn't work well in
Netscape. The header shifts all the way to the right on top of the empty
corner cell, and the name list sometimes disappears and comes back again if
resized in the other axis. IE is fine. If someone could look at this and
give me suggestions I'd appreciate it. The function with constants is pasted
below.

The page is created by a VB6 program and uploaded via FTP. I put it out with
a debug switch set, so extra spaces and line feeds are included. If the
records keeper uploads again, those will go away, but for the time being the
page source can be easily read.

function redraw() {
if (dd) {
var ww=f_clientWidth();
var wh=f_clientHeight();
if (ww<500) ww=500;
if (wh<500) wh=500;
dd.style.width=ww-160;
dd.style.height=wh-175;
hh.style.width=ww-175;
nn.style.height=wh-190;
}
}

dd is set at the end of the page by:

var hh=document.getElementById('head');
var nn=document.getElementById('names');
var dd=document.getElementById('detail');
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top