Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I would like to open a jquery dialog that asks a question before taking the user to the desired page (ie do some page set-up before they get there). The catch here is that I would like to open the dialog when the user clicks the menu item. I am not sure how to go about this. Could someone point me to some examples where this is done or what I need to do? I am using Drupal 7.

Thanks.

share|improve this question
there is a module which might be helpful - drupal.org/project/modal_forms – Jack-PL Apr 29 at 19:15
Thanks for the link to that project it looks like I could use on a future project, but for the a current project that I am working on now I would like to do it programmatically. – user5013 Apr 29 at 19:21
I've got something like that. I did it with the help of MYTHEME_menu_link__menu_my_menu($variables) there I customized the link behavior to open the dialog – Jack-PL Apr 29 at 19:31
try ctools module – Aboodred1 Apr 29 at 20:22

1 Answer

You can use dialog ui or colorbox, just attach this scripts to the page and add custom click event for menu item to open popup. Or you can use ctools but it's more complex.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.