473,320 Members | 1,831 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,320 software developers and data experts.

Resizing Table not working in Firefox?

Hi All,

I am using a table in my page. I am changing the size (width and Height) of the table while resize of the browser. It is working fine with IE but not working with FF. Please provide me the solution.
I am opening the page using javascript with the following settings.

Expand|Select|Wrap|Line Numbers
  1. var WinSettings = 'titlebar=no, status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resize=yes,resizable=yes';
  2. window.open('http://localhost/MyFirefox/Default2.aspx','MyPage',WinSettings);
  3.  
Default2.aspx Page Javascript that is calling on onresize event

[HTML]<script type="text/javascript" language="javascript">
function alertSize()
{
var myWidth = 0, myHeight = 0;
var x = document.getElementById('MyTable');
if( typeof( window.innerWidth ) == 'number' )
{
//Non-IE
myWidth = window.innerWidth - 20;
myHeight = window.innerHeight -20;
}
else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
{
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth - 16;
myHeight = document.documentElement.clientHeight - 16;
}
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
{
//IE 4 compatible
myWidth = document.body.clientWidth - 20;
myHeight = document.body.clientHeight - 20;
}

document.getElementById('MyTable').style.width = myWidth;
document.getElementById('MyTable').style.height = myHeight;
}
</script>

</head>
<body onresize="alertSize()" onload="OnLoad()">
<form id="form1" runat="server">
<table id="MyTable">
<tr style=" width:100%;height:15%; vertical-align:top">
<td style="text-align: right">
<div style="width:100%; height:100%; background-color:Aqua">
<asp:Label ID="Div1" runat="server" Text="DIV1"></asp:Label><br />
<%--<asp:Label ID="Label1" runat="server" Text="DIV1"></asp:Label><br />
<asp:Label ID="Label2" runat="server" Text="DIV1"></asp:Label><br />
<asp:Label ID="Label3" runat="server" Text="DIV1"></asp:Label><br />
<asp:Label ID="Label6" runat="server" Text="DIV1"></asp:Label><br />
<asp:Label ID="Label7" runat="server" Text="DIV1"></asp:Label><br />--%>
<asp:Label ID="Label8" runat="server" Text="DIV1"></asp:Label><br />
<asp:Label ID="Label9" runat="server" Text="DIV1"></asp:Label><br />
<asp:Label ID="Label5" runat="server" Text="DIV1"></asp:Label><br />
<asp:Label ID="Label4" runat="server" Text="DIV1"></asp:Label><br />
</div>
</td>
</tr>
<tr style=" width:100%;height:70%; overflow:auto; vertical-align:top">
<td>
<div style="width:100%; height:100%; background-color:AliceBlue; overflow:auto">
<asp:Label ID="Div2" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label10" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label11" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label14" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label12" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label13" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label15" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label55" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label57" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label58" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label16" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label56" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label17" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label18" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label19" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label20" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label21" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label22" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label23" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label24" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label25" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label26" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label27" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label28" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label29" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label30" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label31" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label32" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label33" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label34" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label35" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label36" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label37" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label38" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label39" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label40" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label41" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label42" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label43" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label44" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label45" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label46" runat="server" Text="DIV2"></asp:Label><br />
<asp:Label ID="Label47" runat="server" Text="DIV2"></asp:Label><br />
</div>
</td>
</tr>
<tr style=" width:100%;height:15%; vertical-align:top">
<td>
<div style="width:100%; height:100%; background-color:BlueViolet">
<asp:Label ID="Div3" runat="server" Text="DIV3"></asp:Label><br />
<asp:Label ID="Label48" runat="server" Text="DIV3"></asp:Label><br />
<asp:Label ID="Label49" runat="server" Text="DIV3"></asp:Label><br />
<asp:Label ID="Label50" runat="server" Text="DIV3"></asp:Label><br />
<%--<asp:Label ID="Label51" runat="server" Text="DIV3"></asp:Label><br />
<asp:Label ID="Label52" runat="server" Text="DIV3"></asp:Label><br />
<asp:Label ID="Label54" runat="server" Text="DIV3"></asp:Label><br />
<asp:Label ID="Label53" runat="server" Text="DIV3"></asp:Label><br />--%>
</div>
</td>
</tr>
</table>
</form>
</body>[/HTML]
Sep 1 '07 #1
3 2344
pbmods
5,821 Expert 4TB
Heya, sivavenugopal. Welcome (back) to TSDN!

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

I removed the extra '?'s from your thread title, as they were causing people to AVOID reading your thread.

What do you want your code to do? Give an example.
What is your code doing that you don't want it to do? Give an example.
What is your code *not* doing that it is supposed to? Give an example.
Sep 2 '07 #2
Hi Thanks for your suggestions.

Actually i don't want scroll bars to the entire page. I want the scrollbar to the content place holder only. So i placed the content placeholder in DIV tag with overflow as auto. It is working fine with IE but not working with FF.
In FF the table in side the ConetentPlaceHolder are not resizing to DIV element they are overflowing outside of the DIV.
Please provide me the solution.
Sep 5 '07 #3
acoder
16,027 Expert Mod 8TB
Don't forget the units, e.g. "px".
Sep 5 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: TJ Talluto | last post by:
<facts> I have a "month calendar" that always displays exactly 42 days... and alongside is a vertical box that displays the detail (form fields) of any particular select event that appears on the...
11
by: Norman L. DeForest | last post by:
Am I misunderstanding the CSS specifications or is Firefox (version 1.0.6) (and Opera) doing the wrong thing? It appears that Firefox 1.0.6 includes the border in width calculations for tables...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
3
by: PCgeek | last post by:
sorry moved this over to javascript forum, didn't mean to post 2x! Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page...
4
by: enceladus311 | last post by:
I've read through a number of links that discuss various methods of resizing a div; however, nothing seems to work correctly for me. The basic idea is that I would like to implement is a panel...
3
by: visu | last post by:
Hi , I need a solution for my problem with IFRAME in firefox. The problem is that i ve to make the IFRAME to increase in its height to displays its whole content dynamically .i ve set...
2
by: JMT | last post by:
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...
13
by: bgraphics2031 | last post by:
I'm trying to get this iframe to dynamically resize by dragging a vertical bar, but it's not working in Mozilla (It originally worked in IE but I've been trying to port it over). Any help will be...
9
by: dli07 | last post by:
Hello, I'm trying to convert a piece of code that creates a dynamic vertical resizing bar in a table from internet explorer to firefox. It's based on a post from...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.