• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Inserting into DB when last page loaded

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have done it but now one problem is that the values are automatically inserted in the database when the last page is loaded.
The last page includes the buttons, from that buttons after clicking Save button, the values should be inserted.
So i defined one html function to call the method for inserting the data and called that html function on the Onclick event of the button.
I can't understand what may be problem..
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually what problem do you have ...?? I am unable to understand it.
 
shriganesh kakade
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to insert the data from multiple jsp pages into the database.
So i had used the java beans to retain the values.
Now i want to insert the data when the last jsp page's Save button is clicked.
So i wrote the insert query in one method from another class.
And that method is called in that last jsp page.
But the problem is that when that last page is loaded, immediately all the data is inserted into the database, before clicking the Save button..
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please update the code whatever you have written..
 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

shriganesh kakade wrote:I want to insert the data from multiple jsp pages into the database.
So i had used the java beans to retain the values.
Now i want to insert the data when the last jsp page's Save button is clicked.
So i wrote the insert query in one method from another class.
And that method is called in that last jsp page.
But the problem is that when that last page is loaded, immediately all the data is inserted into the database, before clicking the Save button..



Could you please post the code of the last jsp page?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic