<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[devshare.de - Insertion.After Problem mit IE]]></title>
		<link>http://devshare.de/topic/41318/insertionafter-problem-mit-ie/</link>
		<description><![CDATA[Die neusten Beiträge in Insertion.After Problem mit IE.]]></description>
		<lastBuildDate>Thu, 20 Jul 2006 21:01:44 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Insertion.After Problem mit IE]]></title>
			<link>http://devshare.de/post/46463/#p46463</link>
			<description><![CDATA[<p>Hallo,</p><p>das Problem bei Deinem Beispiel liegt daran, dass Du ja nicht nur ein INPUT Element erzeugst, sondern dieses in ein Label und eine P-Tag einbettest. Wenn man nun ein neues Element an das letzte INPUT hängen will (parts[]), wird dieses nach dem ersten Einfügen vom IE nicht gefunden. FF hängt den Content dann einfach an des INPUT-ELEMENT an .. der IE hat damit Probleme. Du könntest das Beispiel etwa wie folgt lösen:</p><div class="codebox"><pre><code>&lt;div id=&quot;add_sub&quot;&gt;
&lt;a href=&quot;#&quot; onclick=&quot;addPart(); return false;&quot; name=&quot;adds[]&quot;&gt;more&lt;/a&gt;
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var addPart = function() {
    var pc = document.getElementsByName(&#039;adds[]&#039;);
    var i = pc.length+1;
    var content = &#039;&lt;p id=&quot;adds[]&quot;&gt;&lt;label for=&quot;p&#039;+i+&#039;&quot;&gt;&#039;+i+&#039;. Email:&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;parts[]&quot; size=&quot;20&quot; class=&quot;txt&quot; id=&quot;p&#039;+i+&#039;&quot; /&gt;&lt;/p&gt;&#039;;
    new Insertion.After(pc[i-2], content);
}
&lt;/script&gt;</code></pre></div><p>vg<br />Hannes</p>]]></description>
			<author><![CDATA[dummy@example.com (j|g)]]></author>
			<pubDate>Thu, 20 Jul 2006 21:01:44 +0000</pubDate>
			<guid>http://devshare.de/post/46463/#p46463</guid>
		</item>
		<item>
			<title><![CDATA[Insertion.After Problem mit IE]]></title>
			<link>http://devshare.de/post/46456/#p46456</link>
			<description><![CDATA[<p>Hi,</p><p>ich benutze prototype-1.4.0.js und habe Problem mit Insertion.After bei IE, hat jemand vielleicht schon damit Erfahrung gemacht und mir weiter helfen kann.</p><p>Die Code:<br /> -- JavaScript --</p><p>...<br />var addPart = function() {<br />&nbsp; &nbsp; var pc = self.document.getElementsByName(&#039;parts[]&#039;);<br />&nbsp; &nbsp; var i = pc.length + 1;<br />&nbsp; &nbsp; var content = &#039;&lt;p&gt;&lt;label for=&quot;p&#039;+i+&#039;&quot;&gt;&#039;+i+&#039;. Email:&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;parts[]&quot; size=&quot;20&quot; class=&quot;txt&quot; id=&quot;p&#039;+i+&#039;&gt;&lt;/p&gt;&#039;;<br />&nbsp; &nbsp; new Insertion.After(&#039;pc[(pc.length-1)], content);<br />}<br />...</p><p>-- HTML --</p><p>...<br />&lt;div id=&quot;add_sub&quot;&gt;<br />&lt;a href=&quot;#&quot; onclick=&quot;addPart(); return false;&quot; name=&quot;add&quot;&gt;more&lt;/a&gt;<br />&lt;/div&gt;&#039;<br />...</p><p>funktioniert mit FireFox reibungslos. Mit IE nicht. IE bringt die Fehlermeldung:<br />die HTML-Quelle ist für diese Operation nicht gültig.</p><p>Danke!</p>]]></description>
			<author><![CDATA[dummy@example.com (hoaianh)]]></author>
			<pubDate>Tue, 18 Jul 2006 07:12:59 +0000</pubDate>
			<guid>http://devshare.de/post/46456/#p46456</guid>
		</item>
	</channel>
</rss>

