Creating a custom confirmation
Minqensan - June 24, 2009 - 16:32
| Project: | Ajax |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
I want to create a confirmation that's not limited to the message in JS.
I'm not sure I understand everything that I read in the docs.
so I create a module:
<?php
function ajax_saveconfirm_story_submit(&$form, &$form_state) {
// What do I put here?
}
?>With some JS:
Drupal.Ajax.plugins.ajax_saveconfirm = function(hook, args) {
if (hook === 'message') {
alert("save success!");
}
}
Like this would work?
Thanks!
