Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFramePrintingPrinting
Previous
 
Next
New Post
8/3/2008 8:38 AM
 

Hi, I developed a working aspx page the last few months, and on one of the pages I have a printing button which works fine when the page is loaded standalone.

When I put the page into an iFrame, the printing button from my content page does not work--no errors; just a reload of the page and then nothing. Now I realize the iFrame has a printing capability, but I wanted to make the printing button only available on the one page that is printer friendly, within the iFrame. Is there any way for my content page's print functionality to work in an iFrame? And if it can be made to print, will it print just the iFrame content or try for the whole page?

I am a very new programmer and the thought of reprogramming my months of work into a DNN module seems awful, yet the iFrame seems to work excellently other than the printing issue. (Oh, and the autoresizing, but that's another story.). Any thoughts?

Thank-you,

Mike

 
New Post
8/4/2008 11:22 AM
 

A simple onclick="window.print" placed in a link inside your page will work.

In other words, if you place a simple <a href="#" onclick="window.print">Print Me</a> inside the page that you are displaying inside an IFrame, it should/will pop the printing dialog box and you'll be able to print the contents of that "iframed" page.

If you are still having issues, please show us some actual code.


Vitaly Kozadayev
Principal
Viva Portals, L.L.C.
 
New Post
8/5/2008 10:36 PM
 

The code below is in the iFrame page code behind. It prints fine if the page is loaded standalone, but nothing happens when this code is fired when it is in the iFrame:

"<script language=""JavaScript"" type=""text/javascript"">" + ControlChars.Lf"<!--" + ControlChars.Lf"window.print();" + ControlChars.Lf 'Prints just the contents of the iFrame (but too small)

javaScript +=

javaScript +=

ClientScript.RegisterStartupScript(

"// -->" + ControlChars.Lf"</script>" + ControlChars.LfMe.GetType, "PrintWindowScript", javaScript)

javaScript +=

javaScript +=

 
New Post
8/6/2008 11:41 AM
 

most of your code was eaten by a Forum Dog... :(

send me a zip file to vitaly.kozadayev AT dotnetnuke, please


Vitaly Kozadayev
Principal
Viva Portals, L.L.C.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFramePrintingPrinting


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out