Trying to gain a better understanding of this situation is proving to be rather perplexing. Everything I come across seems to involve iframes, which are not relevant to my current setup.
Here's the scenario: I have a form on a domain that I control. When someone clicks submit, it triggers a request to a third-party service (infusionsoft) and submits certain information.
What I'd like to achieve is sending an ajax post request with the user-entered data directly to the third party, bypassing the need for them to hit submit.
The form itself is a standard POST form with hidden inputs related to the campaign. Essentially, it's provided by the third party as code to embed on your website.
However, when attempting to submit via ajax, I encounter a cross-site scripting error in the console.
Some burning questions:
How does their server recognize that it's receiving an ajax request? Wouldn't it see the post request as though the user had clicked 'submit' conventionally?
What steps should I take to successfully execute this without errors?
There's advice floating around about using PHP and ajax posting to a PHP file that does something.... What separates this approach from what I'm currently doing? Can you offer any insights into how they might suggest resolving the issue? Their guidance was quite vague.
Thanks!