• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

IFRAME - print

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have multipul IFRAME in a single page and one button Print All.

If the user click the Print All button I should print all the IFRAME content without displaying Print Dialogbox?

Is it possible, if so please share me the code.

Thanks in Advance,
Kamalakar B.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would you want to goto a random page and have it start printing? That is why the print dialog is there. If you are only concerned with IE, then you can look into ActiveX.

Eric
 
Bairavarsu Kamalakar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric,

If I use WebBrowser1 object ActiveX control with ieExceWB(6, -1) the entire page will be printed without print dialog prompt. But no IFRAME contents will be printed.

e.g.

I have 3 IFRAME in one single page if Print All button is clicked the content of 3 IFRAME should be printed.

code:
for(int i=0; i < frameName.length; i++)
{
document.getElementById(frameName[i].ieExecWB(6, -1));
}
the above code is not working properly it says object dosen't support this method/property.

Any Idea?

Thanks,
Kamal
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
parent.frameName.....
or
parent.frames["frameName" or Number]....

Eric
 
Bairavarsu Kamalakar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric,

It doesn�t work?

Here is my code

function printAll()
{
var formObj = document.forms[0];
for(var i =0; i < formObj.length; i++)
{
var element = formObj.elements[i];
if(element.type == "checkbox")
{
var frameName = document.getElementById(element.name+"IFRAME");
window.frames[frameName].contentWindow.ieExecWB(6, -1);
}
}
}
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kamal,

ieExecWB doesn't work on SP2...

Did you find any solution?...


Baris
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic