...

View Full Version : Pagination Puzzler?



fuzzy1
05-20-2008, 10:08 PM
Hey All,
Have written a "Summary Notes (http://www.areainspect.com/summary.htm)" form for a Home Inspection Report Writing Web-App I've been working on -- for far too long now.
I'm wondering if anyone would be so kind as to suggest a means by which to break the form up into separate "pages"
should the input in the many textareas cause the form height to grow larger than a max height of -- say 930px?
The form is broken into sections something like

<div id=section_1>
<p><textarea> </p>
<p><textarea> </p>
<p><textarea> </p>
<p><textarea> </p>
<p><textarea> </p>
<p><textarea> </p>
</div>
<div id=section_2>
<p><textarea> </p>
<p><textarea> </p>
<p><textarea> </p>
<p><textarea> </p>
<p><textarea> </p>
<p><textarea> </p>
</div>
Only the first textarea-row of each section is displayed by default,
and up to five additional rows can be displayed per section.

The trouble I'm having is finding a suitable means by which to paginate -- ON THE FLY --
keeping the sections grouped on a page should any textarea-row of a given section cause the form to exceed a defined max page height.

I was thinking of placing the sections in an array, and calling them into the form onload, to be optionally displayed by a dropdown menu on the condition that there is room remaining in the current page -- else somehow pushing overflow/additional sections into an <iframe id='page2' style='pagepage-break-before:auto;'>

Here is a sample of the form (http://www.areainspect.com/summary.htm) thus far.
(Note the page background image which is part of the pagination puzzle -- as will be inclusion of page Header Info -- i.e "Summary Notes for report#blabla" [not included in sample] and "Summary Notes-continued for report#blabla" [which would need to be included in subsequent/overflow pages along with summary background.png])

In the context of the report writing module, the form "summary.php" itself is included via iframe along with 16 other files laid out for print as such...

<iframe scrolling="no" id="kitchen" name="kitchen" frameborder="0" width="100&#37;" height="996px"style="width:740px;height:996px;position:relative;page-break-before:auto;border-width:0px" src="index.php?module=Inspections&action=15_kitchen&sugar_body_only=1"></iframe>

<iframe scrolling="no" id="bathrooms" name="bathrooms" frameborder="0" width="100%" height="996px"style="width:740px;height:996px;position:relative;page-break-before:auto;border-width:0px" src="index.php?module=Inspections&action=16_bathrooms&sugar_body_only=1"></iframe>

<iframe scrolling="no" id="notes_photos" name="notes_photos" frameborder="0" width="100%" style="width:740px;height:996px;position:relative;page-break-before:auto;border-width:0px;display:none;" src="index.php?module=Inspections&action=17-18_notes_photos&sugar_body_only=1"></iframe>

<iframe scrolling="no" id="summary" name="summary" frameborder="0" width="100%" style="width:740px;height:996px;position:relative;page-break-before:auto;border-width:0px;" src="index.php?module=Inspections&action=summary&sugar_body_only=1"></iframe>
as all 16 preceeding 'form' pages have a fixed height, in total this results in a print ready document, however as the height of summary.php can vary widely... it really throws a wrench in the works.
Hope this makes sense... Anyone???

syosoft
05-21-2008, 06:08 AM
Throw 'em in hidden divs and setup tabs or a "next/previous" nav.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum