This might be a very simple question, but I can't figure out the answer.

I love the overlay module in drupal 7, but I am annoyed by the lack of visual feedback when a form is submitted in an overlay. eg. admin/structure/block, hitting submit doesn't give any indication that something is happening in the background.

I would love to know what I have to do to attach some behavior to the submit button of a form in an overlay that provides visual feedback that the form has been submitted (like greying out the overlay or something).

  • This is one of the reasons I turn off Overlay as soon as I can. :-)
    – paul-m
    Mar 18 '12 at 19:41
  • Is this a question about how to add JavsScript or how to write JavaScript that does the above?
    – googletorp
    Mar 18 '12 at 20:32
  • The question is what is the JavaScript that does the above. I know how to write and add it (different ways) but haven't been able to figure out WHAT to write
    – Jamgold
    Mar 18 '12 at 20:46

I just added a block with following code to the content region of my administration theme

<style type="text/css">
#overlay-inactive {
 position: absolute;
 top: 0px;
 left: 0px;
 height: 100%;
   jQuery('#overlay').append('<div id="overlay-inactive">&nbsp;</div>');
  return true;
  • Yeah, that would do it. Mar 20 '12 at 0:18

You could use jquery-loadmask. It looks like it grays out the div and puts a throbber over it.

  • Thanks for answering, I don't think I even need another library. Guess I figured it out
    – Jamgold
    Mar 19 '12 at 4:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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