<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Can&#039;t get AJAX to work for the life of me</title>
		<link>https://legacy.forums.gravityhelp.com/topic/cant-get-ajax-to-work-for-the-life-of-me</link>
		<description>Gravity Support Forums Topic: Can&#039;t get AJAX to work for the life of me</description>
		<language>en-US</language>
		<pubDate>Fri, 24 Apr 2026 22:58:55 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/cant-get-ajax-to-work-for-the-life-of-me" rel="self" type="application/rss+xml" />

		<item>
			<title>Carl Hancock on "Can&#039;t get AJAX to work for the life of me"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cant-get-ajax-to-work-for-the-life-of-me#post-24229</link>
			<pubDate>Wed, 27 Apr 2011 10:27:31 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">24229@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It's hard to tell exactly whats going on without looking at your site setup and doing some testing.  If you send us a WordPress admin login via our Contact Us form and reference this forum post we can take al ook and see what is going on. It could be a theme or plugin conflict.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Nick on "Can&#039;t get AJAX to work for the life of me"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cant-get-ajax-to-work-for-the-life-of-me#post-24199</link>
			<pubDate>Tue, 26 Apr 2011 18:46:54 +0000</pubDate>
			<dc:creator>Nick</dc:creator>
			<guid isPermaLink="false">24199@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I added:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;gravity_form_enqueue_scripts(12, true);
gravity_form_enqueue_scripts(11, true);
gravity_form_enqueue_scripts(16, true);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;inside my functions.php file and now I get this:&#60;br /&#62;
Fatal error: Class 'GFCommon' not found in /home/proscuba/public_html/wp-content/plugins/gravityforms/gravityforms.php on line 1201&#60;/p&#62;
&#60;p&#62;Any suggestions why the forms on these pages won't do AJAX since they are within the loop?&#60;br /&#62;
&#60;a href=&#34;http://newscubamarketing.com/contact/&#34; rel=&#34;nofollow&#34;&#62;http://newscubamarketing.com/contact/&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;http://newscubamarketing.com/work-nick/&#34; rel=&#34;nofollow&#34;&#62;http://newscubamarketing.com/work-nick/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;(I've removed the code from functions.php so my site will load)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Can&#039;t get AJAX to work for the life of me"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cant-get-ajax-to-work-for-the-life-of-me#post-24197</link>
			<pubDate>Tue, 26 Apr 2011 18:31:00 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">24197@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The problem is the shortcode can only enqueue the necessary scripts when it's called from within the WordPress loop.  So if you are calling it from a sidebar like you described, it can't enqueue the necessary CSS and scripts.&#60;/p&#62;
&#60;p&#62;You need to then manually enqueue the necessary CSS and Javascript if you are using the shortcode outside the scope of the WordPress loop or if you are using the function call to display a form.&#60;/p&#62;
&#60;p&#62;Documentation for the function call you use to enqueue the necessary CSS/Javascript can be found here:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Since this form is in the sidebar of every page, the easiest thing to do is add this function call to the functions.php file of your theme.&#60;/p&#62;
&#60;p&#62;The function call is form specific, so if you have multiple forms that are persistent on every page you would need to call that function call multiple times.  If you have some forms being called via a function call in a theme file, you can try placing that function call with the other in the theme file.&#60;/p&#62;
&#60;p&#62;WordPress only allows you to enqueue scripts in certain situations so it can't automatically enqueue the scripts.  It's designed to work when called from the loop.  Outside of the loop you have to manually enqueue the necessary scripts.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Nick on "Can&#039;t get AJAX to work for the life of me"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cant-get-ajax-to-work-for-the-life-of-me#post-24196</link>
			<pubDate>Tue, 26 Apr 2011 18:24:54 +0000</pubDate>
			<dc:creator>Nick</dc:creator>
			<guid isPermaLink="false">24196@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Here's an example page: &#60;a href=&#34;http://newscubamarketing.com/2011/just-do-it/&#34; rel=&#34;nofollow&#34;&#62;http://newscubamarketing.com/2011/just-do-it/&#60;/a&#62; (although any post behaves the same)&#60;/p&#62;
&#60;p&#62;My two sidebar forms (the one email and the one in the modal Questions popover) are done via shortcodes. The form at the end of each post is done via PHP function call. None of them submit via AJAX.&#60;/p&#62;
&#60;p&#62;The modal widget code:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;a class=&#38;quot;lbp-inline-link-1&#38;quot; href=&#38;quot;#&#38;quot;&#38;gt;&#38;lt;img src=&#38;quot;http://cdn.newscubamarketing.com/question.png&#38;quot; alt=&#38;quot;Ask your SCUBA Marketing questions!&#38;quot; /&#38;gt;&#38;lt;/a&#38;gt;
&#38;lt;div style=&#38;quot;display: none;&#38;quot;&#38;gt;
&#38;lt;div id=&#38;quot;lbp-inline-href-1&#38;quot; style=&#38;quot;padding: 10px; background: #fff;&#38;quot;&#38;gt;
        [gravityform id=11 title=true description=true ajax=true]
&#38;lt;/div&#38;gt;
&#38;lt;/div&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The MailChimp widget code:&#60;br /&#62;
&#60;code&#62;[gravityform id=16 title=false description=true ajax=true]&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;The end of post code is embedded in the Genesis Simple Hooks plugin, so it's a bit much to paste it all here.&#60;/p&#62;
&#60;p&#62;What am I doing wrong?&#60;/p&#62;
&#60;p&#62;PHP: 5.2.17&#60;br /&#62;
MySQL: 5.1.52&#60;br /&#62;
WordPress: 3.1.1&#60;br /&#62;
Gravity Forms: 1.5.1
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
