DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13454>. 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=13454 adding focus to the <html:form> tag with two forms of the same name generates a javascript error ------- Additional Comments From [EMAIL PROTECTED] 2002-10-18 23:57 ------- I don't know if there's a good way to find the form number automatically. To be honest, I really think it's simplest just to code the JavaScript outside of tag. If you want to count the forms, that's easy enough to do with scriplets, <% int form=0;%> /... form[<%=form%>] <% form++; %> or to just maintain by hand. IHMO, some of this seems to transcend what might reasonably be expected of the lowly form tag. The focus= is a nice little gimme, but it my experience, it doesn't work in a lot of cases, so I don't even use it myself. It really doesn't do anything you couldn't do just as easily yourself. If someone were to submit a patch for a script that worked better, I'm sure it would be worth considering, but unless it can determine the script number automatically, it might be better to leave the more complex focus use-cases as an exercise for the developer. (Though, as a courtesy, we could document some techniques for alternate ways to set the focus.) There's also use-cases such as changing the focus after they use an element, like <html:select size="1" property="dispatch" onchange="document.forms[0].elements[1].focus()"> Should this be something that the tags should be doing too? I just think after the simplicity of the focus= tag, we start down a slipperly slope. So, I'm not saying no, I'm just asking why? (Hey, but if you fix it, send the patch!) -- To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>