preInvokeJS in s:submit
Hi, I´d like to show a warning message(alert) before erase a record . s:submit value=Erase preInvokeJS=confirm('Confirm ?'); / Is preInvokeJS deprecated ? I have to use : executeScripts=true ? I need an example to do this ... Thanks -- View this message in context: http://www.nabble.com/preInvokeJS-in-s%3Asubmit-tf3815757.html#a10801827 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: preInvokeJS in s:submit
On 25/05/07, Musachy Barroso [EMAIL PROTECTED] wrote: Use notifyTopics instead. I've been trying to do this for ages (display a confirmation dialog when the user is about to do something irrevokable) and it never occured to me to use Ajax :-( Is there any example code anywhere? Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: preInvokeJS in s:submit
Use notifyTopics instead. musachy On 5/25/07, Pedro Herrera [EMAIL PROTECTED] wrote: Hi, I´d like to show a warning message(alert) before erase a record . s:submit value=Erase preInvokeJS=confirm('Confirm ?'); / Is preInvokeJS deprecated ? I have to use : executeScripts=true ? I need an example to do this ... Thanks -- View this message in context: http://www.nabble.com/preInvokeJS-in-s%3Asubmit-tf3815757.html#a10801827 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd
Re: preInvokeJS in s:submit
In show case there are, it is quite simple (not AJAX technically, but javascript) s:submit notifyTopics=/topics ... script dojo.event.topic.subscribe(/topics, function(data, type, event)){ if (type == before) { //do something //to cancel set event.cancel = true; } }); /script On 5/25/07, Roger Varley [EMAIL PROTECTED] wrote: On 25/05/07, Musachy Barroso [EMAIL PROTECTED] wrote: Use notifyTopics instead. I've been trying to do this for ages (display a confirmation dialog when the user is about to do something irrevokable) and it never occured to me to use Ajax :-( Is there any example code anywhere? Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd