From: "Rafael Taboada" <[EMAIL PROTECTED]> > and the generated html code is: > <a > href="/SanCristobal/ComprasNuevo.do?method=Editar+Articulo&idArticulo=1" > onclick="document.forms[0].submit();"> > Balde con asa - Azul - Basa > </a> > And I see the form is not being submitted. > Any solution is welcome because I'm harry =)
Well... assuming there is only one form on your page, I don't see why that wouldn't submit it. However, you're going to get strange behavior from having _both_ the onclick/submit _and_ a href/URL in the link. And I suspect that's why you're saying the form doesn't submit. It does, but immediately after that, off you go to the URL. Check the logs and see if there aren't two requests coming in after you click the link once. This is getting pretty far afield from Struts, but if you need this to be a link, I suggest moving all the parameter-setting into a JavaScript function. Here's an example from my project: <a href="noscript.html" title="Authorized Accounts" onclick="standardTab();return false;">Authorized Accounts</a> (The 'return false;' will stop it going to the URL in the href attribute, unless the user has JavaScript disabled.) and <script language="JavaScript"> function standardTab() { document.forms[0].mode.value="Standard"; document.forms[0].target="_self"; document.forms[0].submit(); } </script> If you need the values to be dynamic, JSTL or <bean:write> can help, since you're dealing with "plain old HTML tags" at this point. -- Wendy Smoak --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]