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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how do I make a webpage reopen itself on close?

    A bit of background: I am creating a trusted internal application for a company ( you cannot browse to this site from the internet ) that uses IE6.02 for the user interface.

    At one point, I am using a PERL script for printing a schedule for a number of staff. I have a PERL script developed that works great when passed a single staff_id. It opens itself, prints the page, and closes the page ( using an ActiveX control that is trusted by the users ).

    Now I would like to pass this script a comma delimited list of staff IDs and have it print the 1st ID then recycle itself with the remaining ID's until all the ID's have printed.

    At the moment I have a simple "self.close()" statement run at the end of the single ID version of the page that closes the window and returns control to the calling page.

    My question is this, is there someway I can replace the self.close() with a statement that calls :

    /url_base/scriptname.cgi?&stafflist='someone,someoneelse,yetanother'

    so that the page calls itself when it closes until all the staff IDs have been printed?

    at the moment, for the multi-ID version of the page I have:

    function recyclepage()
    {
    if ( areThereMoreIDs == 'Y' )
    {
    document.formSchedPrint.submit();
    } else {
    self.close();
    }
    }

    In this case, "areThereMoreIDs" is set based on the comma delimited stafflist variable. Each iteration, the PERL script strips the first ID from the string and sets the form variable "stafflist" to the remaining ( unprocessed ) IDs

    Any help would be appreciated.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,030
    Thanks
    0
    Thanked 247 Times in 244 Posts
    Why not modify the perl script to accommodate multiple ids at the same time? Is that possible?

  • #3
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I want to print one staff members schedule on a single page ... the PERL script opens a browser window, displays header info about the staff member, the schedule info, and some footer info, and this requires 1 page-length of space. Once the page is displayed, a Java-script call to an ActiveX component sends the to the printer, then another java-script command closes the page.

    The PERL script can easily process each staff member in turn, but that requires a single generated web-page to format and print more than 1 page to the printer. Perhaps a good question would be how do you make a single webpage print across multiple print-pages?

    Just seemed easier to recycle the page with no special printer control code.

    So, is there someway in java you can send a page-break to the standard windows printer and print 2 or 3 pages ( with correctly formatted header,body,footer formatting ) from a single webpage?

  • #4
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Have you tried outputting everything to one page and seperating the various staff by using:

    <DIV style="page-break-after:always">staff one content</DIV>
    <DIV style="page-break-after:always">staff two content</DIV>

    And merely calling your print function once and closing when done....

    .....Willy

  • #5
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Works great!
    Thanks


  •  

    Posting Permissions

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