Solved

KEEP PARAGRAPH FROM BREAKING ACROSS PAGE

Posted on 2004-08-15
3
184 Views
Last Modified: 2013-12-24
I am an exam builing site that when the actual exam is generated some of my questions be break across pages. For example:

What is the answer of this question?
A. Answer 1
B. Answer 2
--- page break ---
C. Answer 3
D. Answer 4

How I can group my questions to keep them from breaking across pages?

Here is the code from within my DBRW:
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="55467" -->
<p><b><%=varCounter%>.</b>&nbsp;<%=fp_rs("Ques1")%></p>
<% varCounter = varCounter + 1 %>
<% If fp_rs("Ques2") <> "" AND fp_rs("Ques2") <> "True" Then %>
<p><b>A.</b>&nbsp;<%=fp_rs("Ques2")%></p>
<p><b>B.</b>&nbsp;<%=fp_rs("Ques3")%></p>
<p><b>C.</b>&nbsp;<%=fp_rs("Ques4")%></p>
<p><b>D.</b>&nbsp;<%=fp_rs("Ques5")%></p>
<% Elseif fp_rs("Ques2") = "True" Then %>
<p><b>A.</b>&nbsp;<%=fp_rs("Ques2")%></p>
<p><b>B.</b>&nbsp;<%=fp_rs("Ques3")%></p>
<% Else %>
<p>___________________________________________________________________________________________</p>
<p>___________________________________________________________________________________________</p>
<p>___________________________________________________________________________________________</p>
<p>___________________________________________________________________________________________</p>
<% End if %>
<p>&nbsp;</p>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside tag="BODY" preview="&lt;table border=0 width=&quot;100%&quot;&gt;&lt;tr&gt;&lt;td bgcolor=&quot;#FFFF00&quot; align=&quot;left&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the end of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;" startspan --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" -->

RCMB
0
Comment
Question by:rcmb
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
seanpowell earned 500 total points
ID: 11805906
In the head of your page:

<style type="text/css" media="print">
div { page-break-after: always; }
</style>


and then:


<div>
<!-- Database Code -->
</div>
0
 
LVL 12

Author Comment

by:rcmb
ID: 11806363
Sean,

Your code actually causes the page to break after every question. What I needed was a way to keep it from breaking in the middle of a question but still get more the one question on the page. I know I did not explain that very well but your code did lead me to a solution. What I did was insert a question counter and when I reached four questions then I insert the page break. I did about a dozen tests and it seems to always break around the fifth question so that was where I came up with four.

As always thanks for your help.

R/Curtis
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 11806368
Sorry - I completely misread you intent.
But I'm glad you got it sorted out in the end :-)
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error pops up while using DWCSS 2015 11 152
Ping and Performance monitoring an internal URL website 4 90
Column Spacing 3 58
Widget to get customer remakrs in our website. 3 47
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now