Linking to images with JavaScript in the preview window

rsprake's Avatar

rsprake

08 May, 2012 11:05 PM

I have a JavaScript app that uses the "image/path" node embedded in a data attribute. When I create my img tag with JavaScript and use the "image/path" node the image comes up blank because Cascade wasn't able to render the full path to the image. Is there a different way I should be handling this situation so I can view the app before publishing the page?

  1. Support Staff 2 Posted by Bradley Wagner on 23 May, 2012 07:10 PM

    Bradley Wagner's Avatar

    Can you please include a snippet of both "image/path node" content and the JavaScript that you're attempting to use to output an <img> tag.

  2. 3 Posted by rsprake on 23 May, 2012 07:37 PM

    rsprake's Avatar

    Because I was outputting the image path to a data attribute, I wrapped "path" in [system-asset][/system-asset] in my transformation. That took care of my issue.

  3. Support Staff 4 Posted by Bradley Wagner on 23 May, 2012 08:05 PM

    Bradley Wagner's Avatar

    Great, glad to hear it.

  4. Bradley Wagner closed this discussion on 23 May, 2012 08:05 PM.

Comments are currently closed for this discussion. You can start a new one.