<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Forum posts to 'Extending and hacking'</title>
		<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/</link>
		

		
		<item>
			<title>Extended iFrames</title>
			<link>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/74482</link>
			<description>Some of my iframes include a script...&lt;br /&gt;&lt;br /&gt;How can I add this to the iframes module, or is there another way? Without this ability, I can't use SilverStripe - and so far I really like it. Any help?&lt;br /&gt;Thank you,&lt;br /&gt;Steve&lt;br /&gt;&lt;br /&gt;&amp;lt;IFRAME title=&quot;Search house plans and home plans&quot; id=myFrame frameBorder=0 width=100% height=2000&amp;gt;&amp;lt;/IFRAME&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;    function decodeQuery(query)&lt;br /&gt;    {&lt;br /&gt;        var params = {}; // prepare the map&lt;br /&gt;        if (query.length &amp;lt; 2) // zero characters or single '?' means no parameters&lt;br /&gt;          return params;&lt;br /&gt;        // cut '?' away:&lt;br /&gt;        query = query.slice(1);&lt;br /&gt;        var paramList=query.split('&amp;amp;'); // separate parameters&lt;br /&gt;        for(var i=0; i&amp;lt;paramList.length; i++) // enumerate them&lt;br /&gt;        {&lt;br /&gt;            var pair = paramList[i].split('=');&lt;br /&gt;            params[pair[0]]=pair[1];&lt;br /&gt;        }&lt;br /&gt;        return params;&lt;br /&gt;    }&lt;br /&gt;          &lt;br /&gt;    var query=location.search;        // get everything after question mark&lt;br /&gt;    var params = decodeQuery(query);  // and turn into an indexable structure&lt;br /&gt;    var p = (params.id) // checking if 'id' is present&lt;br /&gt;          ? '&amp;amp;action=more_details&amp;amp;id=' + params.id // if present, then ask for more details&lt;br /&gt;          : ''; // otherwise - don't.&lt;br /&gt;    var iframe = document.getElementById('myFrame');&lt;br /&gt;    &lt;br /&gt;    iframe.src=&quot;http://www.sneserver.com/houseplans/index.php?BuilderID=197&quot; + p;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br&gt;&lt;br&gt;Posted to: Extended iFrames</description>
			<pubDate>Sat, 17 May 2008 15:30:34 +1200</pubDate>
			<author>Steve Nyhof</author>
			<guid>http://www.silverstripe.com/extending-hacking-silverstripe-forum/show/74482</guid>
		</item>
		

	</channel>
</rss>
