Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I need to put the following code into my template:
<script type="text/javascript">
var objLink = new myC_Remote.BuyLink();
objLink.LinkContent = "<img src=\"http://www.mydomain.com/images/remote_Print_this_Image_0.gif\" alt=\"Print this Image\" />";
objLink.IsAboveImage = true;
objLink.LinkClass = "field-items";
objLink.Render();
</script>
I need to check that there is an image attached to the node before this is called. How can I check for the existance of a valid field_image before executing this?
I know this is a lame support request, just hoping there is a friendly super-genius around willing to lend some brain cells to a rookie?
Comments
Comment #2
djudd CreditAttribution: djudd commentedI got it figured out. Needed to close the tags is all.