0

I have a Spring MVC application; a form with a command(form bean) object. I want to submit it using "a href" and want the response of the post request in jquery fancy box. Is it something that can be done? Am able to submit using "a href" using jquery form submit, but the response is coming in the same page and not on the fancy box. please help.

alexbt
  • 16,415
  • 6
  • 78
  • 87
l a s
  • 3,836
  • 10
  • 42
  • 61

1 Answers1

0

You have to do the form submit with AJAX (JQuery $.ajax or equiv) and then read the response from the server and load resulting HTML in Fancybox. If you use a regular <a href="foo"> then the entire page wil load.

Here is an example: https://stackoverflow.com/a/4079930/249327

Community
  • 1
  • 1
nickdos
  • 8,348
  • 5
  • 30
  • 47