Conditionally load JS based on whether or not a field has data?
If a field within a specific content type has some content, load some javascript, if there's nothing in the field, do nothing.

function THEME_NAME_preprocess_page(&amp;$variables) {
  if(isset($variables['node']) &amp;&amp; $variables['node']-&gt;type == "CONTENT_TYPE") {
    if(!empty($variables['node']-&gt;FIELD_NAME)) {
      drupal_add_js(drupal_get_path('theme', 'THEME_NAME') . 'PATH-TO-JS.js', array('type' =&gt; 'file', 'scope' =&gt; 'footer'));

    }
  }
}