myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Slawek <sso...@o2.pl>
Subject Re: JavaScript-Confirm inside a commandlink?
Date Fri, 25 Feb 2005 10:09:56 GMT
ok!

thanks for being patient:D

> Then,
> The onclick should be
> Onclick="return check(blah)"
>
> --Doug
>
> -----Original Message-----
> From: Slawek [mailto:ssobot@o2.pl]
> Sent: Thursday, February 24, 2005 2:21 PM
> To: MyFaces Discussion
> Subject: Re: JavaScript-Confirm inside a commandlink?
>
> thats what i understod reading your posts BUT in my 2 separated projects
> it alwasy submits :|
>
> what could i fu**ed up?
>
> SÅ‚awek
>
>> Well,
>> If your confirm function returns false when the user clicks on cancel,
>> the form will not be submitted.
>>
>> --Doug
>>
>> -----Original Message-----
>> From: Slawek [mailto:ssobot@o2.pl]
>> Sent: Thursday, February 24, 2005 1:28 PM
>> To: myfaces-user@incubator.apache.org
>> Subject: Re: JavaScript-Confirm inside a commandlink?
>>
>> please explain me as i would be an idiot:D
>> //===============================================
>> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
>> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
>> <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
>> <html>
>> <head>
>> <script language="javaScript">
>> 	function clik(){
>> 		a=confirm('sure?');
>> 		if (a)
>> 			return true;			
>> 		return false;
>> 	}
>> </script>
>> </head>
>> <body>
>> <f:view>
>> <h:form >
>> 	<x:commandButton onclick="clik()" action="#{bean.action}"
>> value="aa" />
>> </h:form>
>> </f:view>
>> </body>
>> </html>
>> //===========================================================
>> when user answer cancel on confirm JS window should form be submitted or
>>
>> not?
>>
>>

Mime
View raw message