Computing.Net > Forums > Web Development > max lines in

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

max lines in

Reply to Message Icon

Name: vikont
Date: February 11, 2005 at 07:39:22 Pacific
OS: na
CPU/Ram: na
Comment:

What is the maximum number on lines one can have in the html component like this:

<SELECT name="email_list" size=10 multiple>
<OPTION value="app">Apples
<OPTION value="ban">Bananas
<OPTION value="chr">Cherries
<OPTION value="grp">Grapes
<OPTION value="prs">Pears
<OPTION ...
<OPTION ...
<OPTION ...
</SELECT>


????



Sponsored Link
Ads by Google

Response Number 1
Name: Khalid
Date: February 11, 2005 at 08:08:34 Pacific
Reply:

I think the size is unlimited, only the free memory left for the browser will limit the number of rows. And proper sense of course...


0

Response Number 2
Name: Michael J (by mjdamato)
Date: February 11, 2005 at 08:20:05 Pacific
Reply:

I have built Select lists that were database driven and would have literally hundreds of items. However, as Khalid said, the memory on the client computer can cause a problem. Not so much how much physical memory as much as how the OS handles memory. We had problems in the past with Win95 & Win98 machines on forms with many select lists with many opotions.

Michael J


0

Response Number 3
Name: vikont
Date: February 11, 2005 at 08:21:36 Pacific
Reply:

I don't know why, but i can only see 731 lines.


0

Response Number 4
Name: Khalid
Date: February 11, 2005 at 12:20:43 Pacific
Reply:

If just made a simple php-script to try and generate as much option-tags within a select-tag with a for-loop.

for ($counter = 1; $counter<100000; $counter++)
{
echo "<option>$counter</option>\r\n";
}

I used Mozilla Firefox as a browser. It took a while before the php-engine on my pc had finished the list, and the browser took some have cpu-load in that period, but afterwards I was able to see 69236 option-tags, the html-file was 1477 kbytes.
The generation was stopped because a time-out occured in the php-script...
My pc isnt a real fancy one, so I think it is possible to get some more lines with a more modern computer...

What page are you looking where you can only see 731 lines?



0

Response Number 5
Name: Dr. Nick
Date: February 12, 2005 at 15:15:56 Pacific
Reply:

This is actually somewhat interesting. I gave it a shot myself, and went all the way to 1,000,000 options.

I used Javascript so everything was done in the browser. The script took a while to run, and as you can see it was very resource intensive. It used about 4 solid minutes of CPU time, and over 200MB if RAM. If you notice, my system's commit charge was about 700MB at that time, 68% of my physical RAM, probably the most I've ever used at one time :)

Since I used Javascript, IE told me the page was only 182 bytes. However, to get the size of the complete generated file I wrote a quick C program to generate the same file, WAY faster than the Javascript one (4 mins versus about 2 secs). The result was a 23.7MB file.

So, in the end it seems directly tied to your system's resources. Not CPU power so much, but moreso your RAM. After the script finished running, IE had used about 4 minutes of CPU time and over 200MB of RAM. That's impressive for a web page :)



0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: max lines in

Horizontal Lines in Opera 7 www.computing.net/answers/webdevel/horizontal-lines-in-opera-7/352.html

Show words of array in a diff line www.computing.net/answers/webdevel/show-words-of-array-in-a-diff-line/3990.html

Lines Using Dreamwweaver www.computing.net/answers/webdevel/lines-using-dreamwweaver/2668.html