What have i done so far
I created a website using CGI::Applicationand HTML::Templatesin Perl, which looks like this .
The bottom form will appear for each data set that is in my database. For instance. 400 times.
The idea of the lower form is that the user should be able to make changes to the existing data set, where the upper form creates a new data set.
The top form works and uses Ajax to search the database for invalid values that the user is not allowed to enter.
Problem
On each data set, the "Save" button will appear, as shown in the screenshot.
How to send only the data set corresponding to the "Save" button that was pressed using Ajax?
I can do it using pure jquery and have it hidden inputso
<form action="" method="post">
<input name="anchor" value="34" type="hidden">
<input name="title" type="text" />
...
<button type="submit">Save</button>
</form>
but without Ajax, I cannot first check for invalid values in the database.
What is the Ajax code that will only represent the data set for the form to which the save button belongs?
source
share