Results 1 to 6 of 6

Thread: print just text area and force page breaks

  1. #1
    Join Date
    May 2005

    print just text area and force page breaks

    I was reffered here from the javascript forum. I actually don't know any css. i was told thought that css is the best way to print anything other than what the browser displays.

    that being said, i have a javascript program which creates an ammortization table into a text area. My origional problem was that i wanted to print only the text area. It was then that i was told that css would be the best way to go. Also, the ammortization is usually larger than the text area, which means the text area scrolls. Origionally i solved this by making the text area larger, which meant that users could not print an ammortization larger than 720 months, though there is no plausible reason why they would want to. My second problem emerged when i tried to print the page to test out the program. The printer tries to fit the entire text area on one page, meaning that everything after mont 66 and about half of 67 is cut off and not printed.

    later i was given this code
    <style type="text/css"

    when i put it into a test file, it allowed me to print some overflow (about 2 or three lines out of 7 or 8), partially eliminating the need for the larger text area, but not eliminating the cut off, or my wish to print only the text area.

    any help would be greatly appreciated

  2. #2
    Join Date
    Jan 2004
    This sounds like a media="screen" and media="print" solution to me...

    or you can just link to a simple .txt file where it can be easily printed

    I am not qualified to help you though other than point you to the right direction.
    You could always try searching for media print or wait till someone to reply

  3. #3
    Join Date
    May 2005
    the problem with a .txt file is that the javascript writes the information inside the text area based on the information the user gives the program. i'm not sure how i would go about setting up a .txt file for something like that.

    but thank you for the help, i will look for information on media print, but i'll also wait and see if someone else replies, since i don't know anything really about css and probably won't know what to do with the information if i do find it.

  4. #4
    Join Date
    May 2005
    i found some things on meda print, and on page breaks, but most of it was just confusing. In short, nothing i found could really answer my questions.

  5. #5
    Join Date
    Apr 2003
    Take a look here it may start you in the right direction.


    until someone comes with a more solid example
    Last edited by Mr J; 05-27-2005 at 02:13 PM.
    The Silent One

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is one with an idea

  6. #6
    Join Date
    May 2005
    Thank you for the link, it was a bit clearer.

    Here is an update:
    My main problem at this point is with the page break commands, here is the css I had before with some I halfway figured out

    <HEAD><style type="text/css" media="print">


    At this point, the printer still cuts the textarea off at month 66 which is row 70 I believe. Interesting enough, it now prints another blank page. As I said before I don't know anything about css, so I'm not entirely sure I'm even applying it properly.

    also: i tried replacing auto with inherit, but it didn't change anything.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.11585 seconds
  • Memory Usage 2,884KB
  • Queries Executed 13 (?)
More Information
Template Usage (32):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (6)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates