0

I have an submit form and when i submit it goes to the url of the submit form(in this situation its taak/add_taak) is there a possibility to stay on the page where the submit is done from. underneath you see the html form for the post. is there an html function to stay on the current page where you have the submit form?

<form target="_top" name="form" action="../../../taak/add_taak" method="POST">

Rene
  • 12,141
  • 5
  • 17
  • 26

1 Answers1

0

Are you wanting to retrieve data from the posted page ?

You could use javascript / jquery to do a ajax call to the page

$.post('/taak/addtaak?value1=' + txtValue + '&value2=' + txtValue2, function (data) {
   //this is if you want to post data
});

$.get('/taak/addtaak?value1=' + txtValue + '&value2=' + txtValue2, function (data) {
   //this is if you want to retrieve data
});

This would allow you to post to the page without leaving your current page

please note, you will need to include the jquery library in your website

You could also look here

Submitting HTML form using Jquery AJAX

Edit *

Added link to related Stack Overflow Question

Community
  • 1
  • 1
Inept Adept
  • 414
  • 4
  • 11