Hello,
I get some dynamic controls (ASP .Net) inside a table, the height
property of the table is variable according the controls loaded, so I
need to know the final table height, this value must be an odd number
by graphic design. I put the next code at bottom of the page;
<script type="text/javascript" language="JavaS cript1.2">
if (document.getEl ementById("TABL E1").clientHeig ht%2 == 0)
document.getEle mentById("TABLE 1").height =
document.getEle mentById("TABLE 1").clientHeigh t + 1;
</script>
Works fine in IE6 & IE7, in Firefox 2 and Opera 9 doesn't works, I've
checked with alert(document. getElementById( "TABLE1").heigh t)
and I can see the result desired, but the height of the table remains
and doesn't change in the page. ¿Is there any solution for it works
in Firefox and Opera?
Many thanks. 2 8366
JMT wrote:
Hello,
I get some dynamic controls (ASP .Net) inside a table, the height
property of the table is variable according the controls loaded, so I
need to know the final table height, this value must be an odd number
by graphic design. I put the next code at bottom of the page;
<script type="text/javascript" language="JavaS cript1.2">
if (document.getEl ementById("TABL E1").clientHeig ht%2 == 0)
document.getEle mentById("TABLE 1").height =
document.getEle mentById("TABLE 1").clientHeigh t + 1;
</script>
Works fine in IE6 & IE7, in Firefox 2 and Opera 9 doesn't works, I've
checked with alert(document. getElementById( "TABLE1").heigh t)
and I can see the result desired, but the height of the table remains
and doesn't change in the page. ¿Is there any solution for it works
in Firefox and Opera?
Many thanks.
There is no height property for the table tag, that's why it doesn't
work in standards compliant browsers. When you set the height property,
a new member is created in the table object, but it's not used for anything.
Use the style.height property to set the height of the table. Don't
forget to append the 'px' unit when you set the value.
--
Göran Andersson
_____ http://www.guffa.com
Thank you Göran, now it works!
if (document.getEl ementById("TABL E1").clientHeig ht%2 == 0)
document.getEle mentById("TABLE 1").style.heigh t =
parseInt(docume nt.getElementBy Id("TABLE1").cl ientHeight + 1) + 'px';
Regards.
"Göran Andersson" <gu***@guffa.co mescribió en el mensaje
news:el******** ******@TK2MSFTN GP02.phx.gbl...
JMT wrote:
>Hello,
I get some dynamic controls (ASP .Net) inside a table, the height property of the table is variable according the controls loaded, so I need to know the final table height, this value must be an odd number by graphic design. I put the next code at bottom of the page;
<script type="text/javascript" language="JavaS cript1.2">
if (document.getEl ementById("TABL E1").clientHeig ht%2 == 0) document.getEle mentById("TABLE 1").height = document.getEl ementById("TABL E1").clientHeig ht + 1;
</script>
Works fine in IE6 & IE7, in Firefox 2 and Opera 9 doesn't works, I've checked with alert(document. getElementById( "TABLE1").heigh t) and I can see the result desired, but the height of the table remains and doesn't change in the page. ¿Is there any solution for it works in Firefox and Opera?
Many thanks.
There is no height property for the table tag, that's why it doesn't work
in standards compliant browsers. When you set the height property, a new
member is created in the table object, but it's not used for anything.
Use the style.height property to set the height of the table. Don't forget
to append the 'px' unit when you set the value.
--
Göran Andersson
_____ http://www.guffa.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: §Þ¦w |
last post by:
How can i get the table height by Javascript
|
by: john T |
last post by:
Is there any way to input he screen.height information into <Table
Height=> so I can have my page auto center vertically. I don't want to
use CSS because it disrupts other tables.
|
by: Angelus |
last post by:
I want a table to be 100% as high as the viewable area of the page.
Well, of course, TABLE HEIGHT is no longer an attribute, so I did a
work around using STYLE="height:100%" and <BODY STYLE="height:100%">.
It works great in IE but in Netscape it takes height=100% too
literally and if the page is the slightest bit taller it just cuts it
off and doesn't expand like IE does. Does anyone know of a workaround
for this?
Thank you,
Angelus
|
by: alex |
last post by:
Hi,
It seems like HTML 4.01 Transitional spec. doesn't allow table height
to be expressed in percents.
When i have this doctype tag:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
the percents don't work.
|
by: Derek Fountain |
last post by:
I seem to recall from long ago that the TABLE HEIGHT attribute was
deprecated (or was Netscape only, or something). Hmmm...
I have a web page with a table which controls layout - one row with 3
columns. The left column contains another table containing the left side
menu, and the right side column contains another table for the right side
menu. The main content of the page goes in the middle.
Those two sub-tables are coloured, but as...
| |
by: Arthur Dent |
last post by:
I am completely baffled... i cannot for the life of me get the HEIGHT style
to work on a table in the new 2005-supported XHTML.
I put a HEIGHT: 100% on my table so that my footer row will also show up at
the very bottom of the page (unless content pushes it further down).
But when the browser renders the page, its as if there was no height
specified on the table, it all just shrinks up to the top of the page, as
short as the content will...
|
by: Markus Olderdissen |
last post by:
i want to create my page with 100% height. <table height="100%"works but is not correct by default. i saw various information how
to do it with stylesheet. i really have problems to create my page. i want to have header on top and footer on bottom. content
should be on top of the middle part. i always got scrollbars, even if my page isn't too large. perhaps, someone can show me to do it
right. the following code describes my wish.
...
|
by: maz77 |
last post by:
How can I force a table to get an height of 100% with CSS? I'm using
VisualStudio 2005.
Thanks
MAX
|
by: dlite922 |
last post by:
My site has multiple section each divided into tables (I'm using tables because the other developers slept through HTML 101)
The section table must be a certain height and contains a header (th) cell and a td body cell. What IE6 ignores is the height of the th element (which is 20 or 30px). it works fine in FF but in IE6 it takes up almost 40% of the table. As I put content into the body cells it pushes the TH back to correct size in IE6.
...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |