<?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: Merge Tag to javascript variable not working as expected</title>
		<link>https://legacy.forums.gravityhelp.com/topic/merge-tag-to-javascript-variable-not-working-as-expected</link>
		<description>Gravity Support Forums Topic: Merge Tag to javascript variable not working as expected</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 13:17:57 +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/merge-tag-to-javascript-variable-not-working-as-expected" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "Merge Tag to javascript variable not working as expected"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/merge-tag-to-javascript-variable-not-working-as-expected#post-62964</link>
			<pubDate>Tue, 19 Jun 2012 08:45:59 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">62964@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Glad to hear it. :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>donaker on "Merge Tag to javascript variable not working as expected"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/merge-tag-to-javascript-variable-not-working-as-expected#post-62962</link>
			<pubDate>Tue, 19 Jun 2012 08:44:23 +0000</pubDate>
			<dc:creator>donaker</dc:creator>
			<guid isPermaLink="false">62962@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;please disregard. i figured this one out.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>donaker on "Merge Tag to javascript variable not working as expected"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/merge-tag-to-javascript-variable-not-working-as-expected#post-62925</link>
			<pubDate>Mon, 18 Jun 2012 19:14:58 +0000</pubDate>
			<dc:creator>donaker</dc:creator>
			<guid isPermaLink="false">62925@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have a form set up with a radio button group for selecting from a list of job functions (Administration, Instruction, Technical / IT).&#60;/p&#62;
&#60;p&#62;Upon form submission a post is created.&#60;/p&#62;
&#60;p&#62;In the post body field I have a javascript with a variable (var JobFunction = {Which of the following best describes your job function?:4};).&#60;/p&#62;
&#60;p&#62;The merge tag is being passed like this:&#60;br /&#62;
var JobFunction = Technical / IT;&#60;br /&#62;
rather than&#60;br /&#62;
var JobFunction = &#34;Technical / IT&#34;;&#60;/p&#62;
&#60;p&#62;Is there some way I can pass the merge tag as a string?&#60;/p&#62;
&#60;p&#62;In the script I'm trying to test the variable and use the value to set some other variables like follows:&#60;/p&#62;
&#60;p&#62;if (JobFunction==&#34;Technical / IT&#34;){ do something }&#60;/p&#62;
&#60;p&#62;The problem is that my if statement doesn't work because it doesn't seem to see the variable as a string.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
