Question:

how to print data from a jsp page

by Guest649  |  12 years, 7 month(s) ago

0 LIKES UnLike

how to print data from a jsp page

 Tags: data, jsp, page, print

   Report

1 ANSWERS

  1. paafamily
    there is two ways to do this
    one if you call simple button based submit.
    second if you are using the javascript someform.submit().

    both have diff. way to do it.
    but the basic is when the event fire call other function in javascript created by you which will do two things one print the page and than after it will submit to data base or you can say that submit to the url.

    in first type

    window.addEventListener('submit', somefunction, true);

    in second type

    HTMLFormElement.prototype._submit = HTMLFormElement.prototype.submit;
    HTMLFormElement.prototype.submit = somefunction;

    and the function might be look like

    function newsubmit(event) {
       var target = event ? event.target : this;

       // do print here
       XXXXXXXXXXXXXXXXXXXX

       // call real submit function
       this._submit();
    }

    do change code according to your need.

    no more further question regarding this script this is one i have used for my own purpose but have any thing you need more on java script follow internet search.

    i hope this will help you

Sign In or Sign Up now to answser this question!

Question Stats

Latest activity: 14 years, 6 month(s) ago.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.