|
-
May 29th, 2006, 04:37 PM
#1
[Bug] Nested Tables Limit?
There seems to be a limit on the number of nested tables in browsers, I think.
IE stops at 25, FireFox stops at 31.
Place the following in a webform in Visual Studio, after the @Page directive:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 128px; POSITION: absolute; TOP: 80px" runat="server"
Text="Button"></asp:Button>
<asp:PlaceHolder id="phTables" runat="server"></asp:PlaceHolder>
</form>
</body>
</HTML>
In the codebehind,
Code:
private void Button1_Click(object sender, System.EventArgs e)
{
this.phTables.Controls.Add(AddHTMLTableControl(50));
}
private Table AddHTMLTableControl(int level)
{
Table t = new Table();
t.Width = Unit.Percentage(100);
t.Height = Unit.Point(100);
t.BorderWidth = 1;
TableRow tr = new TableRow();
TableCell tc = new TableCell();
tr.Cells.Add(tc);
t.Rows.Add(tr);
for (int i = 0; i < level; i++)
{
Table t1 = new Table();
t1.Width = Unit.Percentage(100);
t1.Height = Unit.Point(100);
t1.BorderWidth = 1;
TableRow tr1 = new TableRow();
TableCell tc1 = new TableCell();
Label lbl = new Label();
lbl.Text = "level" + i;
// lbl.Width = 26;
tc1.Controls.Add(lbl);
tr1.Cells.Add(tc1);
t1.Rows.Add(tr1);
tc.Controls.Add(t1);
tc = tc1;
}
return t;
}
Now, run the page, click on the button.
Why the limit?
-
May 29th, 2006, 07:25 PM
#2
Re: [Bug] Nested Tables Limit?
 Originally Posted by mendhak
There seems to be a limit on the number of nested tables in browsers, I think.
IE stops at 25, FireFox stops at 31.
Place the following in a webform in Visual Studio, after the @Page directive:
Now, run the page, click on the button.
Why the limit?
If I made a browser I'll only limit it to 10.
why all those nested tables? it'll look terrible and hard to read after all
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
May 30th, 2006, 01:10 AM
#3
Re: [Bug] Nested Tables Limit?
Aesthetical reasoning is irrelevant. We're talking major browsers here. No one would have a hardcoded limit in their browser, that's just poor programming. But the fact that there is a limit implies some sort of limitations that they must have come across in the rendering of the page.
As for the reason I'm doing it, someone I know brought it up and I've been curious as to the reasoning behind it.
-
May 30th, 2006, 04:24 PM
#4
Re: [Bug] Nested Tables Limit?
Come on people, at least speculate. Make guesses, anything logical. Act like Spock for a day.
-
May 30th, 2006, 06:36 PM
#5
Re: [Bug] Nested Tables Limit?
 Originally Posted by mendhak
Come on people, at least speculate. Make guesses, anything logical. Act like Spock for a day.
This means either people are not interested in this topic or they don't think it's not a big deal
EDIT: by the way, congratulations on the 18,000 posts count
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
May 30th, 2006, 06:45 PM
#6
Re: [Bug] Nested Tables Limit?
 Originally Posted by mendhak
No one would have a hardcoded limit in their browser, that's just poor programming.
Are you nuts? Don't you remember the 64K limit on DOS and the resulting, googy, segment offset architecture? To think that there has to be a logical explanation for something like this is to ignore the vast history of irrational decisions in computer and language designs in general.
Somebody probably came up with some design that had a limit of x and everybody else said "yeah, nobody will need to go beyond that." Then nobody actually took any steps to change the limit.
My usual boring signature: Nothing
 
-
May 30th, 2006, 08:14 PM
#7
Re: [Bug] Nested Tables Limit?
Dunno about IE, but for Gecko: Bugzilla 58917
If you think about it, with each table you have a row and a cell also, so that's 3 elements. So it's actually bombing out at 93 nested table-related elements.
Possibly the same type of issue in IE, although we know IE's parser works quite differently.
-
May 31st, 2006, 03:38 AM
#8
Re: [Bug] Nested Tables Limit?
Hmm, alright. I am convinced.
Thanks to the bunch of you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|