Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 27
  1. #1
    Member wolf1728's Avatar
    Join Date
    Jan 2005
    Location
    Boston, MA
    Posts
    37
    Member #
    8723
    The web page is here: http://www.1728.com/cyltank.htm
    It works and I have no problems with that page.
    I am wondering if outputting the data to a text area is the best way to do this. If someone wanted to print out that information, just sending it to the printer would only print what is visible and not what can be seen by moving the scroll bar. (Yes, I know they could copy and paste to Notepad, Word or Excel but most people would rather just click "print").
    I've tried outputting the information to a new window but haven't had much luck with that.
    Any ideas on other ways to do this (if any)?

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Are you talking about printing the contents of the text area along with the formula that generated it?

    If so, you'll want to look at print-specific stylesheets. You can define what is and isn't printable from it. You can even set up things that will only show up on print and not on screen.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Member wolf1728's Avatar
    Join Date
    Jan 2005
    Location
    Boston, MA
    Posts
    37
    Member #
    8723
    TheGame1264
    Thanks for the reply. As a matter of fact, you even replied to a similar thread I made about a month ago: http://www.webdesignforums.net/threa...-window.31831/
    Basically, I want the entire text area to be printed and nothing else.

    Anyway, I like the idea of the print-specific stylesheet because I can now leave the web page as it is and insert a "print" button after the user has decided on which increments to choose. I have never written a print-specific stylesheet so I might have a few more questions.

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    That's cool. Your questions are at least questions that indicate that you've put some thought into what you're doing...y'know, smart questions.

    Just to make things easier, what I usually do is to create a screen stylesheet and a print one. That way, when I'm working on the print one, nothing in the screen one will interfere with it. It's a blank slate that way. But that's just me.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Member wolf1728's Avatar
    Join Date
    Jan 2005
    Location
    Boston, MA
    Posts
    37
    Member #
    8723
    Well I've been trying to get that second "print" page to work but it isn't.

    Would anyone wish to explain how to import 3 values from the parent document to the child document? The child document will again do all the calculations that the parent document does, otherwise, I'd have to pass dozens of variables to it.

    Also, I was wondering if there is a JavaScript tutorial that would explain this in the simplest terms possible?

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    I haven't tried anything like this myself...but you might be able to do something like this in reverse:

    http://www.plus2net.com/javascript_t...dow-child3.php

    I generally don't open new windows for things, though. Popup blockers usually mess up what I'm doing and people get confused by them. That's why I don't know if this will work or not.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  8. #7
    Member wolf1728's Avatar
    Join Date
    Jan 2005
    Location
    Boston, MA
    Posts
    37
    Member #
    8723
    Okay, I came up with something that might be the best solution.
    Methods of passing variables are pretty rotten and if it works in one browser it doesn't work in another.
    So, I just open up a new browser window that is just one "click" away from the original page.
    It is located here:
    http://www.1728.com/passvar.htm
    I've barely had much time to work on it but I like this method a lot.
    Is this a valid solution? Does anyone see any potential problems?

  9. #8
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    I see one off the top in IE (I figure most of your users will test with it, so I started there)...I did a 10" diameter by 10" high tank. It gave me 3.4 US gallons, which passed fine using the Dipstick chart button when I did it the first time. Then I hit back on my browser, pressed the Dipstick Chart button again, and saw nothing.

    You don't necessarily need to pass this to a new page, either. You could theoretically use AJAX, have the results outputted to a div, and then make sure only the output div can be printed. You may find this much easier to work with.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  10. #9
    Member wolf1728's Avatar
    Join Date
    Jan 2005
    Location
    Boston, MA
    Posts
    37
    Member #
    8723
    TheGame1264
    Thanks for your reply. I spent the last few days trying to make a new page which would print the same information as the text area. I was somewhat successful except:
    1) occasionally the new page would print with several lines called "undefined".
    2) As you discovered, going back to the original page, the code "forgets" which of the choices had already been made.
    I will follow your advice and see if I can output the results to a <div>. (I'll probably need some help with that).

  11. #10
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    http://aleembawany.com/2005/09/01/aj...tant-tutorial/

    This would give you the idea. You can tweak accordingly.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Page 1 of 3 1 2 3 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:48 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com