You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mo...@physics.gmu.edu on 2003/07/15 20:38:45 UTC

Java Script Confirm and struts

Hi i wud like to have a confirm box that displays a message saying

" make sure all the values are correct, once it is submitted it cannot be
take back"

I want to have this when a user clicks a "continue" on a JSP page, if the
user clicks "yes" on the continue box it shud submit the form but if the
user
clicks "no" then the form shud not be submitted.I started writing it but i
donno what to

  <html:submit property="Submit" value="Continue" onclick=" "/>

what do i need to write for the onclick for what i need to happen.


--Thanx in advance
   Mohan



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Java Script Confirm and struts

Posted by Firat TIRYAKI <fi...@pleksus.com.tr>.
if you make the change button as a type="button" the below code works fine.

onclick="if (confirm('make sure all the values are correct, once it is
submitted it cannot be take back')){document.formName.submit();} else
{return false;}"


----- Original Message -----
From: <mo...@physics.gmu.edu>
To: <st...@jakarta.apache.org>
Sent: Tuesday, July 15, 2003 9:38 PM
Subject: Java Script Confirm and struts


> Hi i wud like to have a confirm box that displays a message saying
>
> " make sure all the values are correct, once it is submitted it cannot be
> take back"
>
> I want to have this when a user clicks a "continue" on a JSP page, if the
> user clicks "yes" on the continue box it shud submit the form but if the
> user
> clicks "no" then the form shud not be submitted.I started writing it but i
> donno what to
>
>   <html:submit property="Submit" value="Continue" onclick=" "/>
>
> what do i need to write for the onclick for what i need to happen.
>
>
> --Thanx in advance
>    Mohan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org