I have an ASP page which contains a chart and a table of data. I use CSS to have a "Screen" view and a different "Print" view so that I can eliminate all the navigation when the user attempts to print out the page. That all works fine.
However, when the user clicks on the print button, I want to ask them whether they want to print the table, the chart or both. To do this, I use the onbeforeprint function to open a popup which gives the user the various print options in a dropdown list. Once the user selects the option they want the popup sets the contents of the "Print" view in the parent window and closes.
My problem is this. How do I get the parent window to wait for the user to make the selection in the child window. I tried using a while loop in the parent window like:
window1 = window.open(......
while (!window1.closed) {}
However, this just hung up the browser. If I don't put in anything, then it just prints a blank page as the print fires before the user makes the selection in the popup.
Anyone tell me how this can be done??
Mighty
However, when the user clicks on the print button, I want to ask them whether they want to print the table, the chart or both. To do this, I use the onbeforeprint function to open a popup which gives the user the various print options in a dropdown list. Once the user selects the option they want the popup sets the contents of the "Print" view in the parent window and closes.
My problem is this. How do I get the parent window to wait for the user to make the selection in the child window. I tried using a while loop in the parent window like:
window1 = window.open(......
while (!window1.closed) {}
However, this just hung up the browser. If I don't put in anything, then it just prints a blank page as the print fires before the user makes the selection in the popup.
Anyone tell me how this can be done??
Mighty