0 Replies Latest reply on Mar 20, 2008 8:13 AM by cfchick12

    Closing seperate browser after cfcontent

      Hi all,
      I would like to get some help on cfcontent.
      I use cfcontent to open a pdf in a seperate browser,
      which works.I have a close button on the parent
      window, along with other information related to the document.
      When I hit the close button, I would like the pdf browser(window)
      to close. It doesn't seem to recognize that the PDFImage window is open.

      Below is my code to display the image
      <cfheader name="Content-Disposition" value="#URL.Image#">
      <cfcontent type="application/pdf" file="#URL.Image#">

      //Code to close the image window in the parent window close button.
      function closepage(){
      //one way
      if (window.PDFImage && window.PDFImage.open && !window.PDFImage.closed){
      //other way
      if (PDFImage != null && PDFImage.open){

      The next issue is, I am trying to display a jpg in a <table, the image must
      be within the table. It works when I have the <img tag, but I Would
      like to replace it, due to some sharing violation of the image being displayed.
      cfcontent seems to work, but it takes the whole browser, other codes(like buttons)
      are ignored.

      <table align="left" cellpadding="0" cellspacing="0" class="withborder">
      <tr> <td><span id="List3">
      <cfheader name="Content-Disposition" value="#Form.image_file#">
      <cfcontent type="image/jpeg" file="#Form.image_file#">

      <!---<img border="2" id="img1" src="#Form.image_file#" width="250">--->

      I am using MX 7. Any suggestions/solutions are welcome.
      Thanks all for your time.