http://qs1969.pair.com?node_id=11131481

johnfl68 has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I have a form that I need to pre-populate with the previous responses made from that form. I was going to pre-populate the HTML Form with JSON data using jquery and then pass to a CGI to save the results to a JSON file, but Chrome is now blocking external files like this, even though everything is on the same local server.

So now I am doing this with CGI to load the JSON values and output the HTML with the form data pre-populated.

So can I submit the form data to the same CGI Perl script? Or do I need to have one CGI for the HTML Form, and another CGI to process the form and save to the JSON file?

I see lots of examples of posting form data from HTML to a CGI to process, and I have done this before. I am not finding any examples of how to bring the data into the same CGI script from the outputted HTML.

I am probably missing something simple, but if the only way to do it is with 2 CGI scripts, that will work as well.

Thank you.

Original content restored above by GrandFather

PerlMonks admins, please remove. Unfortunately people here think every question is stupid, and no longer wish to help other people like they used to do. They only want to downvote questions from people trying to learn and ask for help when something is confusing, instead of trying to help them.

I will look for help elsewhere.

Thank you.