dojo.event.connect(document.getElementById('${elementId}'),
"onclick",
function(e) {
if (!confirmDelete()) {
e.preventDefault();
return false;
}
}
The problem is that even if confirmDelete returns false, the ajax script is performed anyway.
Where am i wrong ?
On 1/10/06, Andreas Andreou <[EMAIL PROTECTED]> wrote:
Leonardo Quijano Vincenzi wrote:
> As Andrea Chiumenti said, I also think an onclick answer of "no"
> should interrupt the whole Ajax processing.
???
That's what
(confirm('Really delete?')==false) return false;"
does. No further _javascript_ will get evaluated, nor will the href value of the anchor be used.
> The problem would be if Dojo puts something *before* the onclick
> event, not after.
>
But anyway, I now prefer the dojo event connectors solution.
No need for the users to mess with the onclick attribute directly.
-------------------------------------------------------
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
