I've set up a web-to-lead contact form in order to sync contact requests from the website with Salesforce CRM. The sync works fine: the filled fields from the website are showed in the CRM. I need to set up a verification check (all the fields are required). To tho this, I've used a javascript-injected submit. When a user fill the fields and then submit the form, here is the error:
XMLHttpRequest cannot load https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.
Origin '' stands for "http://domainname.ext", obviously.