You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Marcelo Caldas - CCSC <mc...@ccsc.com> on 2001/12/11 16:19:26 UTC

converting to submit...

Hi,
Someone knows a way to convert a <A HREF> linK into a form <submit>

I know that I can use <A HREF="..." onClick=submit()>, but my problem is that I have several links with that, and I need to know which one the user clicked on...

Any sugestions?


Re: converting to submit...

Posted by Krishnamoorthy <ck...@india.hp.com>.
Hi,
  Just in your onClick call a some method with a parameter and inside that method you check the condition that's all.
Cheer's
Kicha

Marcelo Caldas - CCSC wrote:

> Hi,
> Someone knows a way to convert a <A HREF> linK into a form <submit>
>
> I know that I can use <A HREF="..." onClick=submit()>, but my problem is that I have several links with that, and I need to know which one the user clicked on...
>
> Any sugestions?




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: converting to submit...

Posted by "Trever M. Shick" <ts...@objectwave.com>.
With standard html you can do this:

<input type=hidden name="action" value="default">
<a href="" onClick="myForm.action.value='link1';myForm.submit()">

This way, the submitted form will now have a NV pair of action=link1
as well as the rest of the form values.


Trever

----- Original Message -----
From: "Marcelo Caldas - CCSC" <mc...@ccsc.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, December 11, 2001 8:19 AM
Subject: converting <A HREF> to submit...


Hi,
Someone knows a way to convert a <A HREF> linK into a form <submit>

I know that I can use <A HREF="..." onClick=submit()>, but my problem is
that I have several links with that, and I need to know which one the user
clicked on...

Any sugestions?




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>