View Full Version : Problem in printing an iframe in javascript

01-19-2009, 08:36 AM
Hi all,

I printed an iframe using javascript. The problem is that there is a part that should be appeared together but in the printout, some times it appears in two pages in the printout.

eg: .........................(dotted line to enter signature)

These two appears separately sometimes according to the length of the data entered by the user.
Is there any way to handle this using javascript? I want the above data to be appeared in a single page in the printout.


01-19-2009, 09:10 AM
It may be because it's late and I'm tired, or it may be because my interpretive skills lie mainly in grammatical English, but I don't have any clue what you're asking.

1) Explain using complete sentences.
2) Show us the code you're working on.

Then we can help.

Philip M
01-19-2009, 09:40 AM
It's early here, not late :D And the early worm catches the bird! :D

If I understand the OP correctly, if a user fills in some textarea with several lines of text, then the printed page overflows onto a second page.

As I see it the only solutions are:-

a) to restrict the number of lines of text that the usr can enter

b) allow more space in total in the iframe.

Quizmaster: Which surname was shared by a historical outlaw called "Butch" and a fictional cowboy called "Hopalong"?
Contestant: Lesbian.

01-19-2009, 09:41 AM
This is the code i am working.

<td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<td width="42%" height="30" align="left" valign="bottom"><? if($fna['consultant'] == "11") echo "<hr color='#000000' width='60%' class='dotted_line' align='left' />" ?></td>
<td width="42%" align="left" valign="bottom"><? if($fna['consultant1'] == "22") echo "<hr color='#000000' width='60%' class='dotted_line' align='left' />" ?></td>
<td height="25" class="text" align="left" width="30%"><strong><? if($fna['consultant'] == "11") echo $row['Desc']; ?> </strong>
</td> <td class="text"><strong><? if($fna['consultant1'] == "22") echo $row['Desc1']; ?> </strong></td>
<td align="left" class="text2"><? if($fna['consultant']=="11") echo $row['Name']; ?> </td>
<td class="text2"> <? if($fna['consultant1'] == "22") echo $row['Name1']; ?> </td>
<td align="left" class="text2"><? if($fna['consultant'] == "11") echo $row['Qualification']; ?>
</td><td class="text2">
<? if($fna['consultant1'] == "22") echo $row['Qualification1']; ?> </td>

In here I want to make sure that the dotted line and the Name,Desc and Qualification of each Consultant to be appeared together in the print out.

eg: Sometimes the dotted line is appearing on one page and the other attributes appear in another page. (This happens due to the length of the data entered by the user to the report.)


01-19-2009, 09:54 AM
Philip pointed out I was being a jerk. Point taken ;)

Apologies to the OP, I honestly didn't understand him the first time through ;)