rcmb
asked on
KEEP PARAGRAPH FROM BREAKING ACROSS PAGE
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/fpdbr gn1.inc"-- >
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="55467" -->
<p><b><%=varCounter%>.</b> <%=f p_rs("Ques 1")%></p>
<% varCounter = varCounter + 1 %>
<% If fp_rs("Ques2") <> "" AND fp_rs("Ques2") <> "True" Then %>
<p><b>A.</b> <%=fp_rs ("Ques2")% ></p>
<p><b>B.</b> <%=fp_rs ("Ques3")% ></p>
<p><b>C.</b> <%=fp_rs ("Ques4")% ></p>
<p><b>D.</b> <%=fp_rs ("Ques5")% ></p>
<% Elseif fp_rs("Ques2") = "True" Then %>
<p><b>A.</b> <%=fp_rs ("Ques2")% ></p>
<p><b>B.</b> <%=fp_rs ("Ques3")% ></p>
<% Else %>
<p>_______________________ __________ __________ __________ __________ __________ __________ ________</ p>
<p>_______________________ __________ __________ __________ __________ __________ __________ ________</ p>
<p>_______________________ __________ __________ __________ __________ __________ __________ ________</ p>
<p>_______________________ __________ __________ __________ __________ __________ __________ ________</ p>
<% End if %>
<p> </p>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/f pdbrgn2.in c" i-groupsize="0" clientside tag="BODY" preview="<table border=0 width="100%"> <tr> <td bgcolor="#FFFF00" ; align="left"> <font color="#000000"& gt;This is the end of a Database Results region.</font></t d></ tr>< /table> " startspan --><!--#include file="../../_fpclass/fpdbr gn2.inc"-- >
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" -->
RCMB
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/fpdbr
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="55467" -->
<p><b><%=varCounter%>.</b>
<% varCounter = varCounter + 1 %>
<% If fp_rs("Ques2") <> "" AND fp_rs("Ques2") <> "True" Then %>
<p><b>A.</b> <%=fp_rs
<p><b>B.</b> <%=fp_rs
<p><b>C.</b> <%=fp_rs
<p><b>D.</b> <%=fp_rs
<% Elseif fp_rs("Ques2") = "True" Then %>
<p><b>A.</b> <%=fp_rs
<p><b>B.</b> <%=fp_rs
<% Else %>
<p>_______________________
<p>_______________________
<p>_______________________
<p>_______________________
<% End if %>
<p> </p>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../_fpclass/f
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" -->
RCMB
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry - I completely misread you intent.
But I'm glad you got it sorted out in the end :-)
But I'm glad you got it sorted out in the end :-)
ASKER
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