struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Gin" <Gin.C...@NielsenMedia.com>
Subject RE: Java Script Confirm and struts
Date Tue, 15 Jul 2003 19:30:09 GMT
<html:submit property="Submit" value="Continue"
onclick="javascript:confirmSubmit()"/>
should be
<html:submit property="Submit" value="Continue" onclick="javascript:return
confirmSubmit()"/>
-Tim

-----Original Message-----
From: mohan@physics.gmu.edu [mailto:mohan@physics.gmu.edu]
Sent: Tuesday, July 15, 2003 3:28 PM
To: struts-user@jakarta.apache.org
Subject: RE: Java Script Confirm and struts


Hi did as u guys said but it submits the page anyway, i want the page not
submitted if i press the cancel button.It submits the page if press OK or
Cancel This is what i did...


<script>
	function confirmSubmit(){
		var agree=confirm("Make Sure all the Values are correct,
once submitted
this form cannot be take back");
		if(agree)
				return true;
		else
				return false;
	}
</script>

<html:submit property="Submit" value="Continue" onclick="
javascript:confirmSubmit()"/>

--Thanx in advance

> onclick="return confirm('Your message here')"
>
> -----Original Message-----
> From: mohan@physics.gmu.edu [mailto:mohan@physics.gmu.edu]
> Sent: Tuesday, July 15, 2003 12:39 PM
> To: struts-user@jakarta.apache.org
> 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




---------------------------------------------------------------------
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


Mime
View raw message