Hi All,
I have a jsp page with some javascript fucnctions and with two buttons as "Print" and "Cancel".While opening this jsp i am getting some datas from database and displaying them.When the user clicks the "Print" button i want to insert some of the datas in the data base.For that i am calling a javascript function inside which i am calling the javascript print command to print the page.And i have written the jsp code to insert the datas in to the database.Here my problem is the jsp code executes when the jsp page opens itself and the insert query executes.I want to stop this onloading of the page.Is there any way to do this.
Thanks in advance,
Prakash
I have a jsp page with some javascript fucnctions and with two buttons as "Print" and "Cancel".While opening this jsp i am getting some datas from database and displaying them.When the user clicks the "Print" button i want to insert some of the datas in the data base.For that i am calling a javascript function inside which i am calling the javascript print command to print the page.And i have written the jsp code to insert the datas in to the database.Here my problem is the jsp code executes when the jsp page opens itself and the insert query executes.I want to stop this onloading of the page.Is there any way to do this.
Thanks in advance,
Prakash