Return-Path: Delivered-To: apmail-jakarta-struts-dev-archive@apache.org Received: (qmail 3360 invoked from network); 3 Jun 2003 18:33:04 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 3 Jun 2003 18:33:04 -0000 Received: (qmail 8587 invoked by uid 97); 3 Jun 2003 18:35:20 -0000 Delivered-To: qmlist-jakarta-archive-struts-dev@nagoya.betaversion.org Received: (qmail 8580 invoked from network); 3 Jun 2003 18:35:19 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 3 Jun 2003 18:35:19 -0000 Received: (qmail 2426 invoked by uid 500); 3 Jun 2003 18:32:47 -0000 Mailing-List: contact struts-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list struts-dev@jakarta.apache.org Received: (qmail 1824 invoked from network); 3 Jun 2003 18:32:33 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 3 Jun 2003 18:32:33 -0000 Received: (qmail 8558 invoked by uid 50); 3 Jun 2003 18:34:48 -0000 Date: 3 Jun 2003 18:34:48 -0000 Message-ID: <20030603183448.8557.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: struts-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 20459] New: - html:form focus and focusIndex problem X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20459 html:form focus and focusIndex problem Summary: html:form focus and focusIndex problem Product: Struts Version: 1.1 RC1 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Custom Tags AssignedTo: struts-dev@jakarta.apache.org ReportedBy: tkv@landacorp.com The javascript generated when using focus and focusIndex does not account for the following prolblem: We have a radio button group that is dynamically created based on a database query. There may be 1 or more items in the group. In the case where a single item exists, the radio button does NOT have any sub-elements, so in that case we need to use *JUST* the focus attribute of the form tag. However, if the radio button has more than one element we need to use both the focus and the focusIndex attributes. It would be highly desirable to be able to always specify the focus attribute to the name of the radio button and if the focusIndex is NOT specified but sub-elements do exist, the focus is set to the "0" element for the control. EX: My form is "referralsToPvdReport" The field "selectedIndices" is a checkbox group (checkboxes with the same name) The checkboxes are created by iterating over a collection of database records and therefore the index will conditionally be present if more than one record needs to be rendered. var focusControl = document.forms["referralsToPvdReport"].elements["selectedIndices"]; if (focusControl.type != "hidden") { if (focusControl[0]) { focusControl[0].focus(); } else { focusControl.focus(); } } --------------------------------------------------------------------- To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-dev-help@jakarta.apache.org