<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>web2lead &#8211; Hamza Siddiqui</title>
	<atom:link href="https://www.mhamzas.com/blog/tag/web2lead/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.mhamzas.com</link>
	<description>4x Salesforce MVP &#124; 26x Certified &#124; Salesforce App &#38; System Architect</description>
	<lastBuildDate>Fri, 10 Mar 2023 07:55:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
<site xmlns="com-wordpress:feed-additions:1">233526040</site>	<item>
		<title>Salesforce Web to lead and Web to Case using Javascript [CORS Proof !]</title>
		<link>https://www.mhamzas.com/blog/2023/03/10/salesforce-web-to-lead-and-web-to-case-using-javascript-cors-proof-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=salesforce-web-to-lead-and-web-to-case-using-javascript-cors-proof-2</link>
					<comments>https://www.mhamzas.com/blog/2023/03/10/salesforce-web-to-lead-and-web-to-case-using-javascript-cors-proof-2/#respond</comments>
		
		<dc:creator><![CDATA[hamza]]></dc:creator>
		<pubDate>Fri, 10 Mar 2023 07:55:08 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[web2case]]></category>
		<category><![CDATA[web2lead]]></category>
		<guid isPermaLink="false">https://www.mhamzas.com/?p=3513</guid>

					<description><![CDATA[Ever faced a CORS issue while trying to embed Web to lead or Web to Case in your website? CORS Cross-Origin Resource Sharing (CORS) is an HTTP-header-based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than <br /><a href="https://www.mhamzas.com/blog/2023/03/10/salesforce-web-to-lead-and-web-to-case-using-javascript-cors-proof-2/" class="more-link btn btn-primary">Read More</a>]]></description>
										<content:encoded><![CDATA[
<p>Ever faced a CORS issue while trying to embed Web to lead or Web to Case in your website?</p>



<h2 class="wp-block-heading">CORS</h2>



<p>Cross-Origin Resource Sharing (CORS) is an HTTP-header-based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources.<br>Cross-Origin Resource Sharing (CORS) errors <strong>occur when a server doesn&#8217;t return the HTTP headers required by the CORS standard</strong>. To resolve a CORS error from an API Gateway REST API or HTTP API, you must reconfigure the API to meet the CORS standard.</p>



<figure class="wp-block-image size-full"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="640" height="182" src="https://i0.wp.com/www.mhamzas.com/wp-content/uploads/2023/03/image.png?resize=640%2C182&#038;ssl=1" alt="" class="wp-image-3515" srcset="https://i0.wp.com/www.mhamzas.com/wp-content/uploads/2023/03/image.png?w=790&amp;ssl=1 790w, https://i0.wp.com/www.mhamzas.com/wp-content/uploads/2023/03/image.png?resize=300%2C85&amp;ssl=1 300w, https://i0.wp.com/www.mhamzas.com/wp-content/uploads/2023/03/image.png?resize=768%2C219&amp;ssl=1 768w" sizes="(max-width: 640px) 100vw, 640px" /></figure>



<h2 class="wp-block-heading">Solution</h2>



<p>Here&#8217;s a workaround using the form in HTML and processing it through Javascript.</p>



<script src="https://gist.github.com/mhamzas/f2c445ce18bb71b5fce193eddd7ed007.js"></script>



<p>Happy Coding!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.mhamzas.com/blog/2023/03/10/salesforce-web-to-lead-and-web-to-case-using-javascript-cors-proof-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3513</post-id>	</item>
	</channel>
</rss>
