<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: javascript passing in default value</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: javascript passing in default value</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 01:47:39 +0000</pubDate>

<item>
<title>aes on "javascript passing in default value"</title>
<link>https://www.machform.com/forums/topic/javascript-passing-in-default-value#post-20072</link>
<pubDate>Sat, 01 Feb 2014 23:22:46 +0000</pubDate>
<dc:creator>aes</dc:creator>
<guid isPermaLink="false">20072@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Never mind, the issues was the second ? should have been a &#38;#38;
&#60;/p&#62;</description>
</item>
<item>
<title>aes on "javascript passing in default value"</title>
<link>https://www.machform.com/forums/topic/javascript-passing-in-default-value#post-20070</link>
<pubDate>Sat, 01 Feb 2014 12:24:26 +0000</pubDate>
<dc:creator>aes</dc:creator>
<guid isPermaLink="false">20070@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hi, I had read that I can pass in default values like so:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;&#38;lt;script type=&#34;text/javascript&#34;&#38;gt;&#60;br /&#62;
var __machform_url = 'http://xyz.com/advisor2/machform/embed.php?id=11318?element_270=1';&#60;br /&#62;
var __machform_height = 19582;&#60;br /&#62;
&#38;lt;/script&#38;gt;&#60;br /&#62;
&#38;lt;div id=&#34;mf_placeholder&#34;&#38;gt;&#38;lt;/div&#38;gt;&#60;br /&#62;
&#38;lt;script type=&#34;text/javascript&#34; src=&#34;http://xyz.com/advisor2/machform/js/jquery.min.js&#34;&#38;gt;&#38;lt;/script&#38;gt;&#60;br /&#62;
&#38;lt;script type=&#34;text/javascript&#34; src=&#34;http://xyz.com/advisor2/machform/js/jquery.ba-postmessage.min.js&#34;&#38;gt;&#38;lt;/script&#38;gt;&#60;br /&#62;
&#38;lt;script type=&#34;text/javascript&#34; src=&#34;http://xyz.com/advisor2/machform/js/machform_loader.js&#34;&#38;gt;&#38;lt;/script&#38;gt;&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;note the ?element_270=1 added to the url.&#60;/p&#62;
&#60;p&#62;I am not seeing the value being set in my form.I have double checked that element_270 is the one I am after.&#60;/p&#62;
&#60;p&#62;This leads to what I really want to do though.  I want to have a COOKIE be the value being passed in.  Will that work?&#60;/p&#62;
&#60;p&#62;ie&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
function getCookie(cname)&#60;br /&#62;
{&#60;br /&#62;
var name = cname + &#34;=&#34;;&#60;br /&#62;
var ca = document.cookie.split(';');&#60;br /&#62;
for(var i=0; i&#38;lt;ca.length; i++)&#60;br /&#62;
  {&#60;br /&#62;
  var c = ca[i].trim();&#60;br /&#62;
  if (c.indexOf(name)==0) return c.substring(name.length,c.length);&#60;br /&#62;
}&#60;br /&#62;
return &#34;&#34;;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;?element_270='+getCookie(&#34;uid&#34;)
&#60;/p&#62;&#60;/blockquote&#62;</description>
</item>

</channel>
</rss>
