struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Pratt <thechrispr...@gmail.com>
Subject Re: Calling Struts Action from JavaScript
Date Tue, 30 Nov 2010 21:21:17 GMT
Either use ajax or submit the page request, there's no other good way to
access a server side resource from the client side.
  (*chris*)
On Nov 30, 2010 1:15 PM, "Anjib Mulepati" <anjibcs@hotmail.com> wrote:
> Struts 1.3.8
>
> I have text box and button in the JSP page with the function on
> onCLick() event.
> <script lanaguage="javascript">
> function fnClickAddRow() {
> alert("Validating -- Inserting in Db and then add to below table");
>
> //Add row to the table
> }
> </scirpt>
>
> <input type="text" id="email">
> <input type="button" value="Add" onclick="fnClickAddRow();" >
>
>
> Now how I can call the Struts actions also since I have to validate the
> input and insert to database before adding to table?
>
> Anjib
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message