Marcos,
Please google your question the next time.
Don't just spend a few seconds there, really search the network because this is
quite a common problem and the solution is for example here:
http://www.mail-archive.com/tacos-devel@lists.sourceforge.net/msg01703.html
Basically what you need to do is use something like this function to confirm..
function confirmate(text){
if(!window.confirm(text)){
dojo.event.browser.stopEvent(event);
}else{
return 1;
}
}
Btw, go to a shrink.
----- Original Message -----
From: Marcos Chicote
To: Tacos Developers
Sent: Friday, November 24, 2006 10:12 AM
Subject: [Tacos-devel] onclick:javascript confirm()
Hi,
I hava an AjaxImageSubmit inside an AjaxForm.
When the user clicks on the AjaxImageSubmit, a javascript confirm window pops
up and I would like to submit the form if and only if the user click "Ok". If
the user clicks "Cancel" I don't want any kind of submit (not even ajax submit).
For that I have something like this:
<input jwcid="clear" onclick="javascript: confirm('message');"/>
where clear is:
<component id="clear" type="tacos:AjaxImageSubmit">
<binding name="image" value="asset:imgModificar"/>
<binding name="listener" value="ognl:modificarGrupo"/>
<binding name="disabled" value="ognl:true"/>
</component>
and the form is defined like this:
<component id="datosGrupoOrden" type="tacos:AjaxForm" >
<binding name="updateComponents"
value="ognl:{'gruposActuales'}" />
</component>
The window pops but when I click Cancel the form still submits. How can I
avoid this?
Thanks,
Marcos
------------------------------------------------------------------------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
------------------------------------------------------------------------------
_______________________________________________
Tacos-devel mailing list
Tacos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tacos-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Tacos-devel mailing list
Tacos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tacos-devel