473,320 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

iframe printing problem

121 100+
hello,
i really need help from you experts.
my problem is i have one page abc.aspx, and then their is other page called def.aspx(which is printable version), which gives some information used for printing , now my requireement is that i want abc.aspx page to be displayed in def.aspx (empty abc.aspx just with its design) but i dont want to copy paste my abc.aspx code in def.aspx page as abc.aspx page is very big(340kb).

any help will be appreciated and if this is not possible please let me know as well

Regards
Oct 7 '08 #1
8 3501
kenobewan
4,871 Expert 4TB
Well done, was it solved by using master pages?
Oct 7 '08 #2
jay123
121 100+
nops, i figured out, something called iframe. but i am having another problem now..

as i have an iframe in a page and my page has a print button on it, so whenever i give it a print command rather than printing whole content of iframe , its printing only first page of data in iframe(as source page for iframe is quite long, should take 3 pages to print).

any help..
Oct 7 '08 #3
jay123
121 100+
hello,
i have an iframe in a page and my page has a print button on it, so whenever i give it a print command rather than printing whole content of page( data on page+ iframe content) , its printing data on page but only first page of data in iframe(as source page for iframe is quite long, should take 3 pages to print).

any help with coding will be appreciated


Regards
Oct 7 '08 #4
Frinavale
9,735 Expert Mod 8TB
I think there is a much easier solution to your problem.
If you have one page and only want to print certain content on that page you can create a Print Style Sheet (Css2 Print Reference).

Just place the content that you don't want to be printed in panels that are set to a class that has "display:none" set when printing the page.

Please do not double post your question.

-Frinny
Oct 7 '08 #5
jay123
121 100+
I think there is a much easier solution to your problem.
If you have one page and only want to print certain content on that page you can create a Print Style Sheet (Css2 Print Reference).

Just place the content that you don't want to be printed in panels that are set to a class that has "display:none" set when printing the page.

Please do not double post your question.

-Frinny
but my problem is different,

i'll explain it in brief..

i have three <div> in my page.

1st <div> have some textboxes etc
2nd <div> have some more data
now my third <div> has a <iframe>

and i have a print button on my page irrespective of my division, now when i click on this print button, the data on <div> 1st and 2nd prints fine but for 3rd <div> as it has iframe it just prints one page( i know the page i m trying to print in around 3 pages) , basically my problem is what should i add in my code so that i prints every thing in iframe + other data on my page in one go.

Regards
Oct 8 '08 #6
Frinavale
9,735 Expert Mod 8TB
but my problem is different,

i'll explain it in brief..

i have three <div> in my page.

1st <div> have some textboxes etc
2nd <div> have some more data
now my third <div> has a <iframe>

and i have a print button on my page irrespective of my division, now when i click on this print button, the data on <div> 1st and 2nd prints fine but for 3rd <div> as it has iframe it just prints one page( i know the page i m trying to print in around 3 pages) , basically my problem is what should i add in my code so that i prints every thing in iframe + other data on my page in one go.

Regards

Hmm interesting.

I've never tried to print a page that contains an IFrame....does the IFrame show an aspx page that is your content? or is it showing a page from somewhere else?

If it's yours I recommend changing it into an .ascx (user control) that you can add to your 3rd <div>. This way you can print everything.

I'd have to do more research on how to print the content of an IFrame because I've never tried what you're trying here.

Let me know if what I've recommended is feasible.

-Frinny
Oct 8 '08 #7
jay123
121 100+
Hmm interesting.

I've never tried to print a page that contains an IFrame....does the IFrame show an aspx page that is your content? or is it showing a page from somewhere else?

If it's yours I recommend changing it into an .ascx (user control) that you can add to your 3rd <div>. This way you can print everything.

I'd have to do more research on how to print the content of an IFrame because I've never tried what you're trying here.

Let me know if what I've recommended is feasible.

-Frinny
thanks frinny for ur time,

but as the page i am calling in my iframe is an aspx page, and in a same project. as my requirement is i'll be giving printout to someone with all the information( div1,2,3) and that guy will fill that form and then i have to fill that form manually in my system. now the page in iframe is filled manually afterwards. and i m calling it in iframe only bcoz i dont want to copy paste my html coding in my i frame page( as this is very big around 270 entries are to be made) , just doing some code reusability.

i have searched through internet for couple of days, but couldnot find solution. and now wonder is their any solution to this problem..

Regards
Oct 8 '08 #8
jhardman
3,406 Expert 2GB
thanks frinny for ur time,

but as the page i am calling in my iframe is an aspx page, and in a same project. as my requirement is i'll be giving printout to someone with all the information( div1,2,3) and that guy will fill that form and then i have to fill that form manually in my system. now the page in iframe is filled manually afterwards. and i m calling it in iframe only bcoz i dont want to copy paste my html coding in my i frame page( as this is very big around 270 entries are to be made) , just doing some code reusability.

i have searched through internet for couple of days, but couldnot find solution. and now wonder is their any solution to this problem..

Regards
The issue you are describing is the exact reason for which "printer friendly versions" were invented - they put all the text in a single in-line document. An i-frame is not part of that document, it is treated by most browsers as a window painted with the current view of the contents of the frame, so when you go to print it, you get exactly that: a view of the current contents that fit in that frame.

Have you looked into server-side includes? They allow you to include the contents of another page in-line with your page.

Jared
Oct 8 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Marina Ferguson | last post by:
Hi, I have a document with an iframe. The main doc has a "Print" button. The idea is that when the user clicks it, the contents of the iframe is printed. For some reason instead of the iframe...
3
by: Andres Mas Torrecillas | last post by:
Hi! I'm having a little trouble with an IFRAME added in an HTML page. IFRAME has a fixed size and it contains another HTML page, which only has some text paragraphs and a pair of images aligned...
2
by: nightstar | last post by:
I am creating a web page that will contain multiple Iframes. One of the Iframes will contain a bill of sale that is generated by a script on x.mydomain.com/somefile.php?someparameters. One of the...
2
by: Fred | last post by:
I have an aspx page: Main.aspx which has several components that cause a postback. In the page Main.aspx I also have an iframe which contains a multi-page pdf file. The problem I am facing is...
1
by: Poonam | last post by:
Hi I have a page where there is table and below the table there is 'iframe', This page also has 'Print' button. Printing this page is printing the table and iframe contents on 2 different...
10
by: jon | last post by:
I'm trying to use a hidden iframe to print the contents of one div seamlessly. Currently I can create the hidden iframe, copy the contents of the div to the iframe, and print it. I even have a...
1
by: DevGeeta | last post by:
Hi, I have one page with Iframe ...The issue is to Print a page with all data from Iframe also. I tried doing window.print() this print whole page.But not all data from Iframe. Also when...
0
by: pjned | last post by:
Dear friends, I am going to work on a church website created with frameset. I am thinking of do away with the iframe, but there is a video embedded in the menu frame, and I don't want to stop or...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.