We're trying to integrate a dynamically-created iFrame into a Drupal 7 site. There are three parts to making this work:

1. A

in the tag that links to an external .js file hosted on adobe.com; 2. A
in the section with a specific ID; 3. An inline javascript in the that triggers the iFrame rendering. What's the best way to tackle this? Would we create a new module? Attempt to embed it into theme files? Here's how the page is set up as a standalone HTML project, it's pretty simple: http://www.stacyholmstedt.com/magazine/index.html Thanks for any help or advice. Stacy

Comments

mathieso’s picture

Stacy,

I'd probably make a module, though it could be done with contrib as well. Implement hook_node_view, test for the node being viewed, so that you inject the JS into the page you want.

Use drupal_add_js to add the Adobe stuff.

In a new file, write JS to look for the section with the #id, then insert the iFrame, and then trigger. Use drupal_add_js to add that file as well.

Kieran