473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Automatic Pop-up Window Sizer

I have a JavaScript which opens a document in a pop-up window. The complete
document content is contained within a table of fixed width. Currently, I
pass with window height & width as parms. What I would really like is a way
to have the JavaScript automatically resize the window to fit the table!
With some digging I suspect I can get the table width but how do I get the
table length which is dependant on the amount of content?

Any help or suggestions would be appreciated....thanks....brian

Jul 20 '05 #1
2 5596
Can't you use <IFRAME> ?

in that case you put the table in te iframe, and instead of showing the
popup as e new window, load it into the IFRAME.

If you still want to use the popup try to search for offsetheight:

I used once:
hgt =
(document.all)?document.getElementById("datatd").c lientHeight:document.getEl
ementById("datatd").offsetHeight;
to get the height of a TD.. guess you can make it work for a table as well

good luck.

Marco
"Brian" <no*****@rogers.com> schreef in bericht
news:x4******************@news04.bloor.is.net.cabl e.rogers.com...
I have a JavaScript which opens a document in a pop-up window. The complete document content is contained within a table of fixed width. Currently, I
pass with window height & width as parms. What I would really like is a way to have the JavaScript automatically resize the window to fit the table!
With some digging I suspect I can get the table width but how do I get the
table length which is dependant on the amount of content?

Any help or suggestions would be appreciated....thanks....brian

Jul 20 '05 #2
Ivo
"Brian" <no*****@rogers.com> wrote in message
news:x4******************@news04.bloor.is.net.cabl e.rogers.com...
I have a JavaScript which opens a document in a pop-up window. The complete document content is contained within a table of fixed width. Currently, I
pass with window height & width as parms. What I would really like is a way to have the JavaScript automatically resize the window to fit the table!
With some digging I suspect I can get the table width but how do I get the
table length which is dependant on the amount of content?


Not sure about the rest, but in my IE I get good values for a table with id
TableID using
document.all.TableID.clientWidth and document.all.leden.clientHeight
and document.all.TableID.scrollWidth and document.all.leden.scrollHeight
HTH
Ivo
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
2
by: Creat ASP Page Automatic | last post by:
Hi; I want to ask you something very important for me .. how can i Create daynamic pages or static pages Automatic .??????????!!! i have a problem with my website i want Create page asp...
6
by: Gert van der Kooij | last post by:
Hi, It's no problem to define the automatic maintenance using the wizard but I want to use commands to automate automation. I captured the SQL statements when activating the maintenance but that...
2
by: mr_amitkulkarni | last post by:
Hello Friends, Objective : I'm working on a trivial solution for an issue like if my server/pc hangs at any moment it should reboot automatically. proposed Solution : I'll be using an external...
1
by: Michel Esber | last post by:
Hello, Linux RedHat AS4 running DB2 V8 FP11. I have followed the docs at http://tinyurl.com/qckrn and enabled automatic statistics collection. It has been 2 days since I updated my DB cfg and...
3
by: gwainguard | last post by:
Hello I am studying the ECMA specs and was doing wonderfully until just now. They have just broached the topic of AMM and given some example code which seems to be demanding a greater understanding...
58
by: Jorge Peixoto de Morais Neto | last post by:
I was reading the code of FFmpeg and it seems that they use malloc just too much. The problems and dangers of malloc are widely known. Malloc also has some overhead (although I don't know what is...
3
by: myjish18 | last post by:
Hello, We have a DB2 UDB database v8.2.7 (db2 v8.2 fixpak 14) on AIX 5.3 which has Automatic Storage (AS) enabled. We want to disable automatic storage on entire database and/or disable...
25
by: sidd | last post by:
In the following code: int i = 5; ---it goes to .data segment int j; ---it goes to bss segment int main() { int c; int i = 5; ---stack
1
by: =?Utf-8?B?S0ZyaXR6?= | last post by:
Started having problems with popups yesterday. Have the popup blocker set on high. Have Trend Micro but it won't let me do a manual scan. Says it is in use. Also the windows automatic update under...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.