<?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: Submitting a form with target set to a script-generated iframe on IE</title>
	<atom:link href="http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/feed/" rel="self" type="application/rss+xml" />
	<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/</link>
	<description>And the Cosmic AC said, &#34;LET THERE BE LIGHT!&#34; And there was light.</description>
	<lastBuildDate>Tue, 17 Jan 2012 01:42:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: cdo</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-1963</link>
		<dc:creator>cdo</dc:creator>
		<pubDate>Thu, 15 Sep 2011 15:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-1963</guid>
		<description>Hi,
You could do something like
//create an inframe using dom and append to body&#039;s children
//then set a form&#039;s target the new created iframe object
In this fashion you&#039;ll be asked by IE is using a SSL connection if you allow mixed content on your page. I had this problem and, to fully solve it I introduced an iframe in HTML as &lt;b&gt;the first child of the body&lt;/b&gt; thanks to this article so Internet Explorer 6 could find it. Thanks a lot for this hint!</description>
		<content:encoded><![CDATA[<p>Hi,<br />
You could do something like<br />
//create an inframe using dom and append to body&#8217;s children<br />
//then set a form&#8217;s target the new created iframe object<br />
In this fashion you&#8217;ll be asked by IE is using a SSL connection if you allow mixed content on your page. I had this problem and, to fully solve it I introduced an iframe in HTML as <b>the first child of the body</b> thanks to this article so Internet Explorer 6 could find it. Thanks a lot for this hint!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: basma</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-1960</link>
		<dc:creator>basma</dc:creator>
		<pubDate>Mon, 18 Jul 2011 12:13:23 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-1960</guid>
		<description>Thanks a lot.</description>
		<content:encoded><![CDATA[<p>Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tony</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-1934</link>
		<dc:creator>tony</dc:creator>
		<pubDate>Wed, 13 Apr 2011 06:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-1934</guid>
		<description>nice title indeed!
you ranked first in my google search ;)</description>
		<content:encoded><![CDATA[<p>nice title indeed!<br />
you ranked first in my google search ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noah</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-1931</link>
		<dc:creator>Noah</dc:creator>
		<pubDate>Tue, 08 Mar 2011 05:03:21 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-1931</guid>
		<description>Big thanks!</description>
		<content:encoded><![CDATA[<p>Big thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kostas Tsakas</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-1411</link>
		<dc:creator>Kostas Tsakas</dc:creator>
		<pubDate>Sun, 12 Dec 2010 22:11:10 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-1411</guid>
		<description>Oh, thanks a lot. I don&#039;t usually write comments, but I think this is really worth it.
Dude, you saved me from all my pain and frustration...</description>
		<content:encoded><![CDATA[<p>Oh, thanks a lot. I don&#8217;t usually write comments, but I think this is really worth it.<br />
Dude, you saved me from all my pain and frustration&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Linh Vanngo</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-1410</link>
		<dc:creator>Linh Vanngo</dc:creator>
		<pubDate>Fri, 03 Dec 2010 00:30:33 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-1410</guid>
		<description>Awesome!  I suspected it was something weird like this.  Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>Awesome!  I suspected it was something weird like this.  Thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randall Paul</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-1343</link>
		<dc:creator>Randall Paul</dc:creator>
		<pubDate>Mon, 27 Sep 2010 16:18:36 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-1343</guid>
		<description>Thank you.
It&#039;s good to know that there are still good people that share their coding experience with others.</description>
		<content:encoded><![CDATA[<p>Thank you.<br />
It&#8217;s good to know that there are still good people that share their coding experience with others.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daniel</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-1085</link>
		<dc:creator>daniel</dc:creator>
		<pubDate>Thu, 22 Jul 2010 09:32:33 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-1085</guid>
		<description>Thank you very much. I didn&#039;t understand why my scripts didn&#039;t work (still now I don&#039;t understand, but now works).
It is interesting that about 3 years later there is the same problem with IE.</description>
		<content:encoded><![CDATA[<p>Thank you very much. I didn&#8217;t understand why my scripts didn&#8217;t work (still now I don&#8217;t understand, but now works).<br />
It is interesting that about 3 years later there is the same problem with IE.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-980</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Tue, 02 Mar 2010 12:35:05 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-980</guid>
		<description>Hey thank you, don&#039;t you just love how IE makes us work an extra 4hours? x)</description>
		<content:encoded><![CDATA[<p>Hey thank you, don&#8217;t you just love how IE makes us work an extra 4hours? x)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Retepvosnul</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-959</link>
		<dc:creator>Retepvosnul</dc:creator>
		<pubDate>Tue, 22 Dec 2009 16:15:16 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-959</guid>
		<description>Great job,

To bad we still have to make an effort to fix that broken piece of #($&amp;*#$ browser ,but your solutions is great, and makes it behave just as all proper browsers.

But you made my daY !</description>
		<content:encoded><![CDATA[<p>Great job,</p>
<p>To bad we still have to make an effort to fix that broken piece of #($&amp;*#$ browser ,but your solutions is great, and makes it behave just as all proper browsers.</p>
<p>But you made my daY !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nunumick</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-956</link>
		<dc:creator>nunumick</dc:creator>
		<pubDate>Tue, 08 Dec 2009 14:49:05 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-956</guid>
		<description>Thanks a lot,that is coooooooooooool</description>
		<content:encoded><![CDATA[<p>Thanks a lot,that is coooooooooooool</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SébastienM</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-947</link>
		<dc:creator>SébastienM</dc:creator>
		<pubDate>Tue, 29 Sep 2009 09:35:57 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-947</guid>
		<description>Thanks to the trick, and the comments.

Here is my final workaround (IE6, IE7). You need to insert the objet in the elements, and then re-affect the name. This seems to record the iframe 

- frame = createElement(&#039;iframe&#039;
- frame.id =  &quot;my_new_frame&quot;;
 - frame.name = &quot; my_new_frame&quot;;
- insert element in the document
 - (the iframe is known as a document element), re-set the name:

if (document.frames) {
 document.frames[&#039;my_new_frame&#039;].name = &quot;my_new_frame&quot;;
}</description>
		<content:encoded><![CDATA[<p>Thanks to the trick, and the comments.</p>
<p>Here is my final workaround (IE6, IE7). You need to insert the objet in the elements, and then re-affect the name. This seems to record the iframe </p>
<p>- frame = createElement(&#8216;iframe&#8217;<br />
- frame.id =  &#8220;my_new_frame&#8221;;<br />
 &#8211; frame.name = &#8221; my_new_frame&#8221;;<br />
- insert element in the document<br />
 &#8211; (the iframe is known as a document element), re-set the name:</p>
<p>if (document.frames) {<br />
 document.frames['my_new_frame'].name = &#8220;my_new_frame&#8221;;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prakash</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-917</link>
		<dc:creator>Prakash</dc:creator>
		<pubDate>Fri, 03 Jul 2009 06:58:16 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-917</guid>
		<description>Thanks. Really i wasted more than two days to find solution.  After i read this blog within 5 minutes i completed my task.

Thank u very very much...</description>
		<content:encoded><![CDATA[<p>Thanks. Really i wasted more than two days to find solution.  After i read this blog within 5 minutes i completed my task.</p>
<p>Thank u very very much&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-913</link>
		<dc:creator>Andrei</dc:creator>
		<pubDate>Mon, 29 Jun 2009 17:13:15 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-913</guid>
		<description>Another solution to fix the IE bug (tested only on IE8) is to use the regular Mozilla code, and to add:

try
{
window.frames[&#039;upload_iframe&#039;].name=&quot;upload_iframe&quot;;
window.frames[&#039;upload_iframe&#039;].id=&quot;upload_iframe&quot;;
}
catch (e) {}</description>
		<content:encoded><![CDATA[<p>Another solution to fix the IE bug (tested only on IE8) is to use the regular Mozilla code, and to add:</p>
<p>try<br />
{<br />
window.frames['upload_iframe'].name=&#8221;upload_iframe&#8221;;<br />
window.frames['upload_iframe'].id=&#8221;upload_iframe&#8221;;<br />
}<br />
catch (e) {}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmitry Polushkin</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-885</link>
		<dc:creator>Dmitry Polushkin</dc:creator>
		<pubDate>Wed, 10 Jun 2009 12:29:10 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-885</guid>
		<description>Hey, man... thanks for this post. Really helped me.

I&#039;m using jQuery to generate iframe tag, and I&#039;ve tried to use attr(&#039;name&#039;, iframe_id), but I had a problem described in this post.

Now I&#039;m using
var iframe = $(&quot;&quot;);

And it works in IE fine, thank you maaaan for help me to resolve this problem.</description>
		<content:encoded><![CDATA[<p>Hey, man&#8230; thanks for this post. Really helped me.</p>
<p>I&#8217;m using jQuery to generate iframe tag, and I&#8217;ve tried to use attr(&#8216;name&#8217;, iframe_id), but I had a problem described in this post.</p>
<p>Now I&#8217;m using<br />
var iframe = $(&#8220;&#8221;);</p>
<p>And it works in IE fine, thank you maaaan for help me to resolve this problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zombie</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-882</link>
		<dc:creator>Zombie</dc:creator>
		<pubDate>Tue, 26 May 2009 00:29:17 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-882</guid>
		<description>Thanks, saved me a lot of time.. \o/</description>
		<content:encoded><![CDATA[<p>Thanks, saved me a lot of time.. \o/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xor</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-865</link>
		<dc:creator>xor</dc:creator>
		<pubDate>Wed, 15 Apr 2009 08:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-865</guid>
		<description>Superb fix! Thanks a lot! You made my day :)</description>
		<content:encoded><![CDATA[<p>Superb fix! Thanks a lot! You made my day :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Poashoas</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-861</link>
		<dc:creator>Poashoas</dc:creator>
		<pubDate>Mon, 23 Mar 2009 11:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-861</guid>
		<description>Do you know how long I have been searching for his? I found out the iframe had to be build dynamicly but that Name property was totaly new to me. Nice post and it took a while before I had the Google &#039;magic words&#039;. Now let&#039;s build it in and cross my fingers :-D</description>
		<content:encoded><![CDATA[<p>Do you know how long I have been searching for his? I found out the iframe had to be build dynamicly but that Name property was totaly new to me. Nice post and it took a while before I had the Google &#8216;magic words&#8217;. Now let&#8217;s build it in and cross my fingers :-D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gevorg</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-855</link>
		<dc:creator>gevorg</dc:creator>
		<pubDate>Tue, 24 Feb 2009 22:16:23 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-855</guid>
		<description>Hi

I used compact solution for this hole, but it was not working for IE7. Every time when I was trying to upload, new popup was adding and uploading goes there. After I read your comments and changed scripts, but now processing don&#039;t works on IE7 too. Now page just redirects to action page in same frame.

Here is script:

/**
*
*  AJAX IFRAME METHOD (AIM)
*  http://www.webtoolkit.info/
*
**/

AIM = {
	frame : function(c) {
		var n = &#039;f&#039; + Math.floor(Math.random() * 99999);
		
		var i;
		try {
		  i = document.createElement(&#039;&#039;);
		} catch (ex) {
		  i = document.createElement(&#039;iframe&#039;);
		}
		
		i.onload = function() {
			AIM.loaded(n);
		}
		
		i.id = n;
		i.name = n;
		i.width = 0;
		i.height = 0;
		i.marginHeight = 0;
		i.marginWidth = 0;
		
		document.body.insertBefore(i, document.body.firstChild);

		if (c &amp;&amp; typeof(c.onComplete) == &#039;function&#039;) {
			i.onComplete = c.onComplete;
		}
		return n;
	},
	form : function(f, name) {
		f.setAttribute(&#039;target&#039;, name);
	},
	submit : function(f, c) {
		AIM.form(f, AIM.frame(c));
		if (c &amp;&amp; typeof(c.onStart) == &#039;function&#039;) {
			return c.onStart();
		} else {
			return true;
		}
	},
	loaded : function(id) {
		var i = document.getElementById(id);
		if (i.contentDocument) {
			var d = i.contentDocument;
		} else if (i.contentWindow) {
			var d = i.contentWindow.document;
		} else {
			var d = window.frames[id].document;
		}
		if (d.location.href == &quot;about:blank&quot;) {
			return;
		}
		if (typeof(i.onComplete) == &#039;function&#039;) {
			i.onComplete(d.body.innerHTML);
		}
	}
}


Can you help me here?

Thanks,
Gevorg</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I used compact solution for this hole, but it was not working for IE7. Every time when I was trying to upload, new popup was adding and uploading goes there. After I read your comments and changed scripts, but now processing don&#8217;t works on IE7 too. Now page just redirects to action page in same frame.</p>
<p>Here is script:</p>
<p>/**<br />
*<br />
*  AJAX IFRAME METHOD (AIM)<br />
*  <a href="http://www.webtoolkit.info/" rel="nofollow">http://www.webtoolkit.info/</a><br />
*<br />
**/</p>
<p>AIM = {<br />
	frame : function(c) {<br />
		var n = &#8216;f&#8217; + Math.floor(Math.random() * 99999);</p>
<p>		var i;<br />
		try {<br />
		  i = document.createElement(&#8221;);<br />
		} catch (ex) {<br />
		  i = document.createElement(&#8216;iframe&#8217;);<br />
		}</p>
<p>		i.onload = function() {<br />
			AIM.loaded(n);<br />
		}</p>
<p>		i.id = n;<br />
		i.name = n;<br />
		i.width = 0;<br />
		i.height = 0;<br />
		i.marginHeight = 0;<br />
		i.marginWidth = 0;</p>
<p>		document.body.insertBefore(i, document.body.firstChild);</p>
<p>		if (c &amp;&amp; typeof(c.onComplete) == &#8216;function&#8217;) {<br />
			i.onComplete = c.onComplete;<br />
		}<br />
		return n;<br />
	},<br />
	form : function(f, name) {<br />
		f.setAttribute(&#8216;target&#8217;, name);<br />
	},<br />
	submit : function(f, c) {<br />
		AIM.form(f, AIM.frame(c));<br />
		if (c &amp;&amp; typeof(c.onStart) == &#8216;function&#8217;) {<br />
			return c.onStart();<br />
		} else {<br />
			return true;<br />
		}<br />
	},<br />
	loaded : function(id) {<br />
		var i = document.getElementById(id);<br />
		if (i.contentDocument) {<br />
			var d = i.contentDocument;<br />
		} else if (i.contentWindow) {<br />
			var d = i.contentWindow.document;<br />
		} else {<br />
			var d = window.frames[id].document;<br />
		}<br />
		if (d.location.href == &#8220;about:blank&#8221;) {<br />
			return;<br />
		}<br />
		if (typeof(i.onComplete) == &#8216;function&#8217;) {<br />
			i.onComplete(d.body.innerHTML);<br />
		}<br />
	}<br />
}</p>
<p>Can you help me here?</p>
<p>Thanks,<br />
Gevorg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/comment-page-1/#comment-850</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Thu, 29 Jan 2009 16:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/#comment-850</guid>
		<description>Still a very relevant article. I wonder if it&#039;s fixed in IE8?

By the way, if anyone wonders what the official standard has to say about this, check this document: http://www.w3.org/TR/DOM-Level-2-HTML/

Page 60 in the pdf version clearly states that HTMLIFrameElement.name should not be readonly.</description>
		<content:encoded><![CDATA[<p>Still a very relevant article. I wonder if it&#8217;s fixed in IE8?</p>
<p>By the way, if anyone wonders what the official standard has to say about this, check this document: <a href="http://www.w3.org/TR/DOM-Level-2-HTML/" rel="nofollow">http://www.w3.org/TR/DOM-Level-2-HTML/</a></p>
<p>Page 60 in the pdf version clearly states that HTMLIFrameElement.name should not be readonly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

