Copy link to clipboard
Copied
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,
^_^
Copy link to clipboard
Copied
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.:)
Copy link to clipboard
Copied
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.
^_^
Copy link to clipboard
Copied
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>