What happens if you  change your code to this instead (exactly) :

function confirm(event) {
  if (!confirmDelete()) {
     event.stopPropogation();
     event.preventDefault();
  }
}

dojo.event.connect(
  "before",
  dojo.byId('${elementId}'),
  "onclick",
  document,
  "confirm"
);

?
jesse

On 1/11/06, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
Hi again,
I've changed the script but the ajax script is executed anyway.

function confirmDelete() {
  return confirm("${msgConfirmDelete}");
}

var dialogMessage = {
  confirm : function (e) {
    if (!confirmDelete()) {
      e.stopPropagation();
      return false;
    }
};

dojo.event.connect(
  "before",
  dojo.byId('${elementId}'),
  "onclick",
  dialogMessage,
  "confirm"
);

On cancel the ajax script on the link is executed anyway.

Could you help me please?
kiuma

On 1/10/06, Andreas Andreou < [EMAIL PROTECTED]> wrote:


Leonardo Quijano Vincenzi wrote:

> Hmmm right, I get it. I was only wondering if the code snippet would
> get documented. I guess I can do it later too ;).

Didn't have time to create a FAQ for it.
I just copy-pasted the jesse's code in a bug comment.
http://tacoscomponents.jot.com/BugReporter/Bug26
If noone does it by tomorrow, i'll do it then :)

>
> (that's the sort of obvious things for the Tacos developers - but
> they're not as obvious to new users! Specially if they don't know Dojo).
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel


Reply via email to