How to open a new window to print data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ghjk
    Contributor
    • Jan 2008
    • 250

    How to open a new window to print data

    I'm using php. In my application there are 2 pages. data.php and print.php. User select some data range to get a report in data.php and i want to open a print.php with the data according to user selected dates. How can i do that?
  • Purple
    Recognized Expert Contributor
    • May 2007
    • 404

    #2
    Hi ghjk,

    Do you want this to launch in a new browser window or within the same ? Is the user hitting a print button ?

    Regards

    Purple

    Comment

    • TheServant
      Recognized Expert Top Contributor
      • Feb 2008
      • 1168

      #3
      Well, what about using a normal database function to recall the data you wanted between dates and output it in a new window and then display a javascript print button?

      You cannot automatically force a print. They will have to click a button, so you may as well make a nice output page and just use that button.

      Comment

      • ghjk
        Contributor
        • Jan 2008
        • 250

        #4
        Originally posted by Purple
        Hi ghjk,

        Do you want this to launch in a new browser window or within the same ? Is the user hitting a print button ?

        Regards

        Purple

        Yes .I want to my data to be load in new browser. Then i can print as normal web page.(File->Print)

        Comment

        Working...