Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 14126 invoked from network); 2 Nov 2005 19:39:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Nov 2005 19:39:17 -0000 Received: (qmail 8785 invoked by uid 500); 2 Nov 2005 19:39:05 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 8764 invoked by uid 500); 2 Nov 2005 19:39:04 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 8753 invoked by uid 99); 2 Nov 2005 19:39:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2005 11:39:04 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [159.182.31.4] (HELO ncspsmtp.ncs.com) (159.182.31.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2005 11:38:59 -0800 Received: from iowacexchbrg.ic.ncs.com (Not Verified[10.25.4.190]) by ncspsmtp.ncs.com with NetIQ MailMarshal (v5.5.6.7) id ; Wed, 02 Nov 2005 13:29:55 -0600 Received: by iowacexchbrg.ic.ncs.com with Internet Mail Service (5.5.2657.72) id ; Wed, 2 Nov 2005 13:27:05 -0600 Message-ID: <18968BD835AAB943BB27330F0A080FB20B644B0C@iowacexch2.ic.ncs.com> From: "Garner, Shawn" To: 'Struts Users Mailing List' Subject: RE: Struts dropdown boxes Date: Wed, 2 Nov 2005 12:52:02 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I recommend the AJAX solution if you can use JavaSript. I recommend NOT submitting the page every time you select a value from the dropdown box. 1) This is an interruption in experience and is interpreted as a slow website because it isn't immediate to the user and they are not even sure why it is submitting. 2) You will be dramatically increasing the bandwidth you use. Multiply the number of options in your dropdown box by the number of fields on the page by the number of users you're expecting. The server has to do extra transfers of the form data to and from the user. I recommend that you make an additional JSP page and put the second dropdown box on it. That way the first page will submit. You can populate the list of values and display the second page with the second dropdown. The second page should NOT have the first dropdown box on it. Shawn D. Garner -----Original Message----- From: Frank W. Zammetti [mailto:fzlists@omnytex.com] Sent: Wednesday, November 02, 2005 8:47 AM To: Struts Users Mailing List Cc: Struts Users Mailing List Subject: Re: Struts dropdown boxes Hi Neil, If your app can tolerate Javascript (i.e., require it), then Ajax is probably your best bet. Take a look here: http://sourceforge.net/projects/javawebparts/ Grab a copy of the JWPCookbook. In it is a recipe called Dynamic Double-Select, which is exactly what you want. You should be able to take that example as-is and use it in your own app without much trouble. If your are Javascript-averse though, your only real choice is a two-step approach, i.e., show the page with the first dropdown and a button which submits the form. Then display the page with the second dropdown and two buttons, one to continue on and one to go back and select another option from the first. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: fzammetti@hotmail.com On Wed, November 2, 2005 8:25 am, Neil Meyer said: > Hi, > > I need to have 2 dropdown boxes on my jsp page. The first dropdowns > selected > value will determine what is pulled from the database for the second > dropdown. > > I know there is a few ways of doing it but would like to know what most of > the people recommend doing this. > > Your help is really appreciated. > > Regards > Neil Meyer > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org **************************************************************************** This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. **************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org