In struts 1.0, we do as follows to determine formName for situations
like this: 
<% String formName =
((org.apache.struts.action.ActionMapping)request.getAttribute(org.apache
.struts.action.Action.MAPPING_KEY)).getName(); %>

This attribute is set in processPopulate method of ActionServlet:
        //also pass the mapping through the request
        request.setAttribute(Action.MAPPING_KEY,
                             mapping);

And then:
<a href="javascript:document.forms['<%=formName%>'].submit();return
false;">Dale masa!!</a>

I don't know if in struts 1.1 it will work, but may be you can tell me.

Cheers.
Guillermo.

-----Original Message-----
From: Geeta Ramani [mailto:[EMAIL PROTECTED] 
Sent: Miércoles, 05 de Mayo de 2004 05:06 p.m.
To: Struts Users Mailing List
Subject: RE: Submit with a link


Michael:

I think "forms" stands for the list (array?) of all forms in that
document. So the form which appears (physically) first on the document
has index 0, the next one has 1, etc.  Is this what you are asking..?

Geeta

> -----Original Message-----
> From: Michael McGrady [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 4:08 PM
> To: Struts Users Mailing List
> Cc: Struts Users Mailing List
> Subject: Re: Submit with a link
> 
> 
> I am a notice in JavaScript.  I have wondered in my brief perusal of
> JavaScript books how you tell which form is the referent of 
> the formindex 
> numbers?

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

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo 
inmediatamente junto con todas las copias del mismo, notificando al remitente. No 
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus 
partes si usted no es el destinatario. Muchas gracias.



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

Reply via email to