Drupal – Run AJAX command after success of another JS command.

Feel free to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

With ajax_command_invoke, I was getting error: Uncaught TypeError: Cannot read property ‘apply’ of undefined — ajax.js

Terrible!

After banging my head for like 4 hours with ajax_command_invoke, I am finally able to do it. Here is an example code.

Here is the full code.

Feel free to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone