I'm working on a Drupal module that uses JavaScript to create a "pop-up" effect whereby a mask layer with 50% opacity is drawn over the page content and then an iframe is put on top of that and a page loaded in the iframe for the user to interact with. When they're done. the "pop-up" destroys the iframe and the mask layer. This is all working great.
No, for my question: when the iframe loads the content from my Drupal site, the content has the navigation menu, header, footer and all the rest of the trimmings, and what I really want is for the iframe to only have the content area of the page.
Is there any way from within a drupal_get_form callback function to cause Drupal to "hide" everything other than the content area of the page?
Tim Gustafson 831-332-1496 tjg@tgustafson.com http://tgustafson.com/
On Thu, 2010-04-29 at 19:59 -0700, Tim Gustafson wrote:
I'm working on a Drupal module that uses JavaScript to create a "pop-up" effect whereby a mask layer with 50% opacity is drawn over the page content and then an iframe is put on top of that and a page loaded in the iframe for the user to interact with. When they're done. the "pop-up" destroys the iframe and the mask layer. This is all working great.
No, for my question: when the iframe loads the content from my Drupal site, the content has the navigation menu, header, footer and all the rest of the trimmings, and what I really want is for the iframe to only have the content area of the page.
Is there any way from within a drupal_get_form callback function to cause Drupal to "hide" everything other than the content area of the page?
Not that hard, I did this by loading my content not in a iframe, but in a normal dom element (jquery ui popup), a custom menu path that does a menu_set_active_handler() then call the right method to get back the content, then return only this content.
Try somethng like this: pastebin.com/uBknmPfQ
Then, use the jQuery.form plugin to submit your form using ajax (quite easy to use), and do not load in an iframe, but in a normal dom element (so you can do ajax in it).
Hope it can help.
Pierre.