Thx a lot !!

Really thank you to everyone =) !!!

Cliff

----- Original Message ----- 
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Wednesday, May 11, 2005 12:05 AM
Subject: Re: [OT] Help !! Too many select-box in one page


> I'd suggest doing some testing to determine where the delay is actually
> occurring... is it reading from the database that takes so long?  Is it
> transit time from the server to the client?  Is it rendering on the
> client?  The firsr two you should be able to determine on the
> server-side, then just subtract that out from the total time to see how
> long the client is taking.
>
> If it's either of the first two then people have given you some options
> to explore already... if it's the later, you'll almost certainly have to
> refactor your design... the suggestion of populating the boxes via
> scripting is a good one, but I've done this extensively and so can tell
> you that it will become a bottleneck in a hurry, no to mention the fact
> that the perceived performance of your site can vary greatly depending
> on the clients' PC.
>
> Hence, my suggestion... once you determine where the greatest amount of
> time is actually spent, then folks can probably help in a hurry :)
>
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> John Fletcher wrote:
> > Cliff,
> >
> >
> >>>>but each select in each list has the same options.
> >
> > If each select in each list has the same options, you can just download
> > the options once to a javascript array and populate all of the select
> > boxes on the client side.  A quick example:
> >
> > <script language="JavaScript">
> >   var optionArray = {<c:out value="${myValuesCSV}" />};
> >
> >   function populateBoxes() {
> >     var mySelectBox;
> >     // You'll need to do this for each box on your form
> >     for (var i = 0; i < optionArray.length; i++) {
> >       mySelectBox.options[i] = new Option(optionArray[i],
> > optionArray[i]);
> >     }
> >   }
> > </script>
> >
> > Call that populateBoxes function on startup.  Who knows how long that'll
> > take to populate client-side, but it should reduce your page size
> > considerably.  If you need different values than text in the select
> > boxes, you could either have a 2-dimensional array (which would require
> > different formatting for the values, or a different method of printing
> > them out in the javascript), or you could maintain 2 arrays, one for
> > values and one for text.  Note that you will need to know all of the
> > names of the select boxes unless you want to just loop through all of
> > the form elements and do the action for any of the select form elements
> > that you find.
> >
> > Your CSV string that you drop into the optionArray will need to have
> > strings quoted if necessary of course.
> >
> > John
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to