<?xml version="1.0" encoding="UTF-8"?><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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: createElement and events, and iframe borders</title>
	<atom:link href="http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/</link>
	<description>Rich Rodecker's blog on flash, flex, actionscript, javascript, and php, with a dash of randomness</description>
	<lastBuildDate>Thu, 11 Mar 2010 05:24:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stuntbox &#8211; Squashing Borders on Dynamic iframes</title>
		<link>http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/comment-page-1/#comment-232936</link>
		<dc:creator>Stuntbox &#8211; Squashing Borders on Dynamic iframes</dc:creator>
		<pubDate>Wed, 10 Mar 2010 05:35:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=107#comment-232936</guid>
		<description>[...] iframe borders in JavaScript&#8221; I could think of) I finally lucked out and hit upon this blog entry at FlashApe. Turns out that for some mysterious reason IE will only get this right if you use camel [...]</description>
		<content:encoded><![CDATA[<p>[...] iframe borders in JavaScript&#8221; I could think of) I finally lucked out and hit upon this blog entry at FlashApe. Turns out that for some mysterious reason IE will only get this right if you use camel [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sky</title>
		<link>http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/comment-page-1/#comment-214770</link>
		<dc:creator>Sky</dc:creator>
		<pubDate>Sat, 29 Aug 2009 23:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=107#comment-214770</guid>
		<description>Jon, thank you so much for pointing out that you have to set the &quot;frameBorder&quot; attribute prior to attaching the iframe to the page (appending as a child)! I was using the correct camelcase but it would only work when the iframe was already part of the html... when I tried dynamically creating it and setting that attribute with JS it wouldn&#039;t work... since I was setting it AFTER I attached it to the page.

Many thanks!</description>
		<content:encoded><![CDATA[<p>Jon, thank you so much for pointing out that you have to set the &#8220;frameBorder&#8221; attribute prior to attaching the iframe to the page (appending as a child)! I was using the correct camelcase but it would only work when the iframe was already part of the html&#8230; when I tried dynamically creating it and setting that attribute with JS it wouldn&#8217;t work&#8230; since I was setting it AFTER I attached it to the page.</p>
<p>Many thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yesyesyes</title>
		<link>http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/comment-page-1/#comment-213920</link>
		<dc:creator>yesyesyes</dc:creator>
		<pubDate>Sat, 22 Aug 2009 17:21:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=107#comment-213920</guid>
		<description>Wait, let me get this straight: 

 or
 works just fine

while

$(iframe).attr(&quot;frameBorder&quot;, &quot;0&quot;); works and
$(iframe).attr(&quot;frameborder&quot;, &quot;0&quot;); does not?

W T F ?</description>
		<content:encoded><![CDATA[<p>Wait, let me get this straight: </p>
<p> or<br />
 works just fine</p>
<p>while</p>
<p>$(iframe).attr(&#8220;frameBorder&#8221;, &#8220;0&#8243;); works and<br />
$(iframe).attr(&#8220;frameborder&#8221;, &#8220;0&#8243;); does not?</p>
<p>W T F ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raj</title>
		<link>http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/comment-page-1/#comment-211628</link>
		<dc:creator>raj</dc:creator>
		<pubDate>Thu, 23 Jul 2009 09:59:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=107#comment-211628</guid>
		<description>Thank you for the information about frameBorder. I spent 3 hours looking for the reason and was annoyed on knowing the reason.

Anyway guys thanks for the solution</description>
		<content:encoded><![CDATA[<p>Thank you for the information about frameBorder. I spent 3 hours looking for the reason and was annoyed on knowing the reason.</p>
<p>Anyway guys thanks for the solution</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: H</title>
		<link>http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/comment-page-1/#comment-203984</link>
		<dc:creator>H</dc:creator>
		<pubDate>Tue, 05 May 2009 10:09:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=107#comment-203984</guid>
		<description>To add, if you try to remove an iframe border once its been added to the DOM in IE, the only way to really remove it is as follows and again, this only works in IE as setting the frameborder dynamically seems to work in other browsers.  This took me hours to figure out on my own so hopefully this will save someone else some serious time:

document.getElementById(&quot;myiframe&quot;).contentWindow.document.body.style.border = &quot;0px&quot;;</description>
		<content:encoded><![CDATA[<p>To add, if you try to remove an iframe border once its been added to the DOM in IE, the only way to really remove it is as follows and again, this only works in IE as setting the frameborder dynamically seems to work in other browsers.  This took me hours to figure out on my own so hopefully this will save someone else some serious time:</p>
<p>document.getElementById(&#8220;myiframe&#8221;).contentWindow.document.body.style.border = &#8220;0px&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: X-Fan</title>
		<link>http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/comment-page-1/#comment-203355</link>
		<dc:creator>X-Fan</dc:creator>
		<pubDate>Tue, 28 Apr 2009 11:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=107#comment-203355</guid>
		<description>&quot;Finally i tried using frameBorder=0 instead….and it worked.&quot;

Yo man, you just saved me.. was wondering why my frameborder attribute was doing nothing. Just the fucking &quot;B&quot;.. damn it.. thanks :D</description>
		<content:encoded><![CDATA[<p>&#8220;Finally i tried using frameBorder=0 instead….and it worked.&#8221;</p>
<p>Yo man, you just saved me.. was wondering why my frameborder attribute was doing nothing. Just the fucking &#8220;B&#8221;.. damn it.. thanks <img src='http://www.visible-form.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ck</title>
		<link>http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/comment-page-1/#comment-175598</link>
		<dc:creator>ck</dc:creator>
		<pubDate>Mon, 27 Oct 2008 17:36:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=107#comment-175598</guid>
		<description>I ran into same issue with frameBorder propery. Thanks for your post.</description>
		<content:encoded><![CDATA[<p>I ran into same issue with frameBorder propery. Thanks for your post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Molokai</title>
		<link>http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/comment-page-1/#comment-174733</link>
		<dc:creator>Molokai</dc:creator>
		<pubDate>Wed, 22 Oct 2008 09:23:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=107#comment-174733</guid>
		<description>Thanks for your post!

It was a lifesaver :)</description>
		<content:encoded><![CDATA[<p>Thanks for your post!</p>
<p>It was a lifesaver <img src='http://www.visible-form.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joon</title>
		<link>http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/comment-page-1/#comment-153196</link>
		<dc:creator>Joon</dc:creator>
		<pubDate>Tue, 29 Jul 2008 08:15:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=107#comment-153196</guid>
		<description>Thanks a lot, I found your frameborder post via google. I had the exact same issue, and now I have both fixed my issue and learned something new.

Great!</description>
		<content:encoded><![CDATA[<p>Thanks a lot, I found your frameborder post via google. I had the exact same issue, and now I have both fixed my issue and learned something new.</p>
<p>Great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anvar</title>
		<link>http://www.visible-form.com/blog/createelement-and-events-and-iframe-borders/comment-page-1/#comment-140634</link>
		<dc:creator>Anvar</dc:creator>
		<pubDate>Thu, 03 Jul 2008 14:17:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.visible-form.com/blog/?p=107#comment-140634</guid>
		<description>Cool...really saving a lot of time of mine for the onclick javascript method in the createelement...

try {
      element = document.createElement(&quot;&quot;);
      } catch (e) {
      element = document.createElement(&quot;input&quot;);
      element.setAttribute(&quot;type&quot;, &quot;checkbox&quot;);
	  element.setAttribute(&quot;checked&quot;,&quot;checked&quot;);
	  }
	  element.setAttribute(&quot;name&quot;, count);
	  element.setAttribute(&quot;id&quot;, count);
	  //element.setAttribute(&quot;onclick&quot;,&quot;setStatus(this)&quot;);
	  element.onclick = function(){
	  	var chkboxrowNo=this.name.slice(5);
		if(this.checked) {
			document.getElementById(&quot;h0&quot;+chkboxrowNo).value=&quot;1&quot;;
	    } else {
			document.getElementById(&quot;h0&quot;+chkboxrowNo).value=&quot;0&quot;;
		}
	  }</description>
		<content:encoded><![CDATA[<p>Cool&#8230;really saving a lot of time of mine for the onclick javascript method in the createelement&#8230;</p>
<p>try {<br />
      element = document.createElement(&#8220;&#8221;);<br />
      } catch (e) {<br />
      element = document.createElement(&#8220;input&#8221;);<br />
      element.setAttribute(&#8220;type&#8221;, &#8220;checkbox&#8221;);<br />
	  element.setAttribute(&#8220;checked&#8221;,&#8221;checked&#8221;);<br />
	  }<br />
	  element.setAttribute(&#8220;name&#8221;, count);<br />
	  element.setAttribute(&#8220;id&#8221;, count);<br />
	  //element.setAttribute(&#8220;onclick&#8221;,&#8221;setStatus(this)&#8221;);<br />
	  element.onclick = function(){<br />
	  	var chkboxrowNo=this.name.slice(5);<br />
		if(this.checked) {<br />
			document.getElementById(&#8220;h0&#8243;+chkboxrowNo).value=&#8221;1&#8243;;<br />
	    } else {<br />
			document.getElementById(&#8220;h0&#8243;+chkboxrowNo).value=&#8221;0&#8243;;<br />
		}<br />
	  }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
