Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ColdFusion.Window.create() - possible to print contents??

LEGEND ,
Dec 29, 2010 Dec 29, 2010

Hello, everyone.

I've been searching Google for this and have not found an answer for it, yet.

Is it possible to use JavaScript to print the contents of an element created by ColdFusion.Window.create()?  I tried using the window name that was supplied when the element was created, but apparently the element (when rendered on the fly by CF server) has a different name/id.

Thanks,

^_^

1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Dec 29, 2010 Dec 29, 2010

Hi,

I'm not sure what you are asking.

However, try using this.

<cfwddx  
    action = "cfml2wddx|wddx2cfml|cfml2js|wddx2js" 
    input = "inputdata
    output = "result variable name
    topLevelVariable = "top-level variable name for JavaScript"
    useTimeZoneInfo = "yes|no"
    validate = "yes|no" >




This tag is useful when creating a variable in coldfusion converting into a Javascript.

If i'm wrong, hope some other people will help us in correcting it.:)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 30, 2010 Dec 30, 2010

Thanks for the reply, but I'm not trying to convert varables between JavaScript and ColdFusion.

Basically put, when the CF server generates the HTML on the fly for ColdFusion.Window.create(), it basically creates a DIV layer (as I understand it) that contains the HTML of the source file.  A DIV can be manipulated by JavaScript, and JavaScript _can_ load the contents (innerHTML) and manipulate.

I'm trying to find a way to print (on paper, or with a PDF-writer) the contents of JUST that DIV.

"self.print();" isn't working - it only prints half the page.. the LEFT half.

^_^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Dec 30, 2010 Dec 30, 2010
LATEST

Hi Wolfshade,

I'm sorry I could not understand your question.

but thinking may be this could help you..

<cfsavecontent variable="strContent">

     <!---print on the pdf ---->

<table>

          <tr>
                <td class=rtitle>Corrective Actions Summary</td>
               
            </tr>

</table>

</cfsavecontent>

<cfdocument format="PDF" orientation="#strOrient#">
    <cfoutput>#strContent#</cfoutput>
</cfdocument>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources