www.webdeveloper.com
Results 1 to 2 of 2

Thread: No JSP or ASP - something else?

  1. #1
    Join Date
    Sep 2004
    Posts
    1

    No JSP or ASP - Need a little help for our Intranet

    Okay, I am a dummy when it comes to scripting etc but I have what should be extremely easy but I am drawing a blank.

    I need to have the user enter information on two different lines.

    I then need to have the user click print and the information is placed on a NON-preprinted form and the graphics and other (static) data is also placed on this form.

    For example:

    Webpage:

    Enter Number: (user types a number)

    Enter Destination: (user types a short destination)

    Click to print



    Output:

    ----------------------------------------
    | LOGO |
    |
    | Pallet number: (output here) |
    |
    | Boring legal stuff .....
    |
    |
    | Destination: (output here)
    |
    |
    |
    ----------------------------------------

    Note - output needs to be in much larger font than the rest.


    Any suggestions would be great - no jsp or asp if possible.

    Thanks!
    Last edited by Surf; 09-02-2004 at 03:05 PM.

  2. #2
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    Simplest way may be to pop open a new window with the text, etc formated for printing and supply a print button. Something like this placed in the main form may work for you:
    PHP Code:
    <button onclick="buildPrint();">Print Form</button>
    <
    script type="text/javascript">
    function 
    buildPrint(){
        var 
    pWin=window.open("","pWin","location=no,menbar=no,toolbar=no");
        
    pWin.document.write("<button id='pButton' onclick='document.getElementById(\"pButton\").style.display=\"none\";window.print()'>Print</button><br />");
        
    pWin.document.write("<img src='http://YourImg.gif' />");
        
    pWin.document.write("<p style='font-size:xx-large'>Large Text</p>");
    ...
        }
    </script> 

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



Recent Articles