click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Demetrios Kyriakis <demetrios.kyria...@gmail.com>
Subject Submit Link - how to show custom messages?
Date Tue, 21 Apr 2009 12:43:06 GMT
Hi,

The new SubmitLink control looks good, but there's one problem:
how to ask the user something before submitting? The control already has 
occupied the onClick event.

E.g. This control is quite practical for deleting something (to have a 
POST), but usually it requires an confirm dialog to ask the user first.
deleteLink.setAttribute("onclick", "return window.confirm('Are you sure 
you want to delete this project?');");

I think a better approach would be for the component to detect if 
there's some user event attached, and insert it's own the on-the-fly 
HTML form building only after the user script.

Right now it is ignoring it, so the SubmitLink does not behave like a 
submit link :(.

Thank you,
Demetrios.


Mime
View raw message