• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to invoke a jsp from java script

 
william kane
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
i need to invoke and execute method in a JSP upon an event getting fired in java script i.e. i click on an image which should invoke a JSP that will insert a record into database. All this should happend without the JSP getting refreshed or reloaded.
Any Pointers are Welcome
Thanks In Advance
William
 
wessel zaalberg
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way to do it is declare a variable for a window.
Open that window out of sight.
Give its document.location.href your jsp + plus name,data pairs that you want in your datebase and then close that window after having waited some time.
This is not a very stable approach your user might close the window before it is finished, the server might be slow.
But that is just the way things go with sneaky thing
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!