Looking at this complex setup, I find myself in a situation where I must find a way to trigger the $.ajax
function on a webpage using a separate Perl script.
The scenario involves a webpage making $.ajax
calls to a Perl file, which retrieves data and sends it back to the webpage. Subsequently, JavaScript processes the data and generates another request for Perl to send an email with that information. [Perl gets data, passes to JS, JS requests Perl again for emailing]
I have been tasked with creating a Perl script to handle the emailing process independently. However, I am required to utilize the existing code. Therefore, my question is: Can my Perl script access the specific $.ajax
call mentioned earlier to obtain, analyze, and then forward the data to Perl for email processing?
If anyone has any insights or suggestions, please share them! Thank you!