Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2006
    Posts
    311
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Pagination Puzzler?

    Hey All,
    Have written a "Summary Notes" 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
    Code:
    	<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 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...
    PHP Code:
    <iframe scrolling="no" id="kitchen" name="kitchen" 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=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???
    Last edited by fuzzy1; 05-20-2008 at 10:11 PM.

  • #2
    Regular Coder
    Join Date
    Sep 2006
    Location
    Vermont, USA
    Posts
    154
    Thanks
    0
    Thanked 6 Times in 6 Posts
    Throw 'em in hidden divs and setup tabs or a "next/previous" nav.
    Active PHP/MySQL application developer available for immediate work.
    syosoft.com mavieo.com - Remote Web Site Administration Suite - Reseller Ready


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •