<?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: Dynamically add form fields using javascript and DOM with dynamic post method</title>
	<atom:link href="http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/</link>
	<description>Misc crap and such</description>
	<lastBuildDate>Thu, 08 Jul 2010 22:19:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: DaijoubuKun</title>
		<link>http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/comment-page-1/#comment-467</link>
		<dc:creator>DaijoubuKun</dc:creator>
		<pubDate>Tue, 06 Apr 2010 22:44:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=120#comment-467</guid>
		<description>As previously noted I DO NOT have a remove field script. A friend tells me he has one, he has yet to provide me the code as there are some issues he would like to resolve. As soon as I have it I will post it.</description>
		<content:encoded><![CDATA[<p>As previously noted I DO NOT have a remove field script. A friend tells me he has one, he has yet to provide me the code as there are some issues he would like to resolve. As soon as I have it I will post it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: afwan auliyar</title>
		<link>http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/comment-page-1/#comment-466</link>
		<dc:creator>afwan auliyar</dc:creator>
		<pubDate>Tue, 06 Apr 2010 12:08:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=120#comment-466</guid>
		<description>thanks for this tutorial ...
Is there a script for &quot;remove&quot; this field which &quot;add&quot; before ?!?</description>
		<content:encoded><![CDATA[<p>thanks for this tutorial &#8230;<br />
Is there a script for &#8220;remove&#8221; this field which &#8220;add&#8221; before ?!?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cameron Graeter</title>
		<link>http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/comment-page-1/#comment-423</link>
		<dc:creator>Cameron Graeter</dc:creator>
		<pubDate>Wed, 10 Mar 2010 17:54:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=120#comment-423</guid>
		<description>No joke you know what you are talking about , thank you</description>
		<content:encoded><![CDATA[<p>No joke you know what you are talking about , thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DaijoubuKun</title>
		<link>http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/comment-page-1/#comment-418</link>
		<dc:creator>DaijoubuKun</dc:creator>
		<pubDate>Sat, 06 Mar 2010 20:13:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=120#comment-418</guid>
		<description>At this time I have found the code I have on this post has issues when you try to remove. A friend of mine says he has a version where you can remove. He hasn&#039;t given it to me yet as there are a few kinks (as in it doesn&#039;t work with some web browsers) As soon as I have a good working version I will modify this post to inform everyone, and write up a new post explaining how it works.</description>
		<content:encoded><![CDATA[<p>At this time I have found the code I have on this post has issues when you try to remove. A friend of mine says he has a version where you can remove. He hasn&#8217;t given it to me yet as there are a few kinks (as in it doesn&#8217;t work with some web browsers) As soon as I have a good working version I will modify this post to inform everyone, and write up a new post explaining how it works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kazi</title>
		<link>http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/comment-page-1/#comment-415</link>
		<dc:creator>Kazi</dc:creator>
		<pubDate>Sat, 06 Mar 2010 04:03:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=120#comment-415</guid>
		<description>Hi there,

I really found your code useful for my own purpose. However would you be able to provide the &quot;Remove&quot; script to delete the fieldsets created?? thanks.</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>I really found your code useful for my own purpose. However would you be able to provide the &#8220;Remove&#8221; script to delete the fieldsets created?? thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jim</title>
		<link>http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/comment-page-1/#comment-285</link>
		<dc:creator>jim</dc:creator>
		<pubDate>Sun, 27 Dec 2009 16:07:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=120#comment-285</guid>
		<description>hi, am really new in javascript but i wanted to post this one as it worked when i tried it.. it removed the newly added field.

just add this code:
   

in the div with id &quot;add_phone&quot;</description>
		<content:encoded><![CDATA[<p>hi, am really new in javascript but i wanted to post this one as it worked when i tried it.. it removed the newly added field.</p>
<p>just add this code:</p>
<p>in the div with id &#8220;add_phone&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maxcim</title>
		<link>http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/comment-page-1/#comment-282</link>
		<dc:creator>Maxcim</dc:creator>
		<pubDate>Sat, 26 Dec 2009 22:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=120#comment-282</guid>
		<description>Hi,

first of all thank you for the script. I was looking for this.

I have only one question:
Why does this work:

 
Naam: 
Geboorteplaats: 
Geboortedatum: 
 
 
Naam: 
Geboorteplaats: 
Geboortedatum: 


But this doesn&#039;t:
 
 
Naam:  
Geboorteplaats:   
Geboortedatum: 
 
  
 
 
Naam:  
Geboorteplaats:   
Geboortedatum: 
 


If i put the form in a table, only the data from the first div is send but not the data from the second div, .

Thank you :D</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>first of all thank you for the script. I was looking for this.</p>
<p>I have only one question:<br />
Why does this work:</p>
<p>Naam:<br />
Geboorteplaats:<br />
Geboortedatum: </p>
<p>Naam:<br />
Geboorteplaats:<br />
Geboortedatum: </p>
<p>But this doesn&#8217;t:</p>
<p>Naam:<br />
Geboorteplaats:<br />
Geboortedatum: </p>
<p>Naam:<br />
Geboorteplaats:<br />
Geboortedatum: </p>
<p>If i put the form in a table, only the data from the first div is send but not the data from the second div, .</p>
<p>Thank you <img src='http://blog.tangorangers.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sch</title>
		<link>http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/comment-page-1/#comment-278</link>
		<dc:creator>sch</dc:creator>
		<pubDate>Fri, 25 Dec 2009 12:51:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=120#comment-278</guid>
		<description>Many thanks DaijoubuKun. However I still can&#039;t get it work. Could you tell me how I can post my code here so you can see what is wrong.

Let me try to put my code here:

`
&lt;code&gt;
&quot;



var counter = 0;

function add_child() {
    counter++;
    var newFields = document.getElementById(&#039;add_child&#039;).cloneNode(true);

    newFields.id = &#039;&#039;;
    newFields.style.display = &#039;block&#039;;
    var newField = newFields.childNodes;
    for (var i=0;i&lt;newField.length;i++) {

        var theName = newField[i].name
        if (theName)

                newField[i].name = theName + counter;
}

        var insertHere = document.getElementById(&#039;child&#039;);
        insertHere.parentNode.insertBefore(newFields,insertHere);

}


var compter = 0;

function add_member() {
    compter++;

    var newFields = document.getElementById(&#039;add_member&#039;).cloneNode(true);
    newFields.id = &#039;&#039;;
    newFields.style.display = &#039;block&#039;;
    var newField = newFields.childNodes;
    for (var i=0;i&lt;newField.length;i++) {
        var theName = newField[i].name
        if (theName)
                newField[i].name = theName + compter;

        }
        var insertHere = document.getElementById(&#039;add_member&#039;);
        insertHere.parentNode.insertBefore(newFields,insertHere);
}





	Member: 

	

    	
	


	
    	

		
	
		
	







	Member: 

	

    	
	


	
    	

		
	
		
	





&quot;
&lt;/code&gt;
`</description>
		<content:encoded><![CDATA[<p>Many thanks DaijoubuKun. However I still can&#8217;t get it work. Could you tell me how I can post my code here so you can see what is wrong.</p>
<p>Let me try to put my code here:</p>
<p>`<br />
<code><br />
"</p>
<p>var counter = 0;</p>
<p>function add_child() {<br />
    counter++;<br />
    var newFields = document.getElementById('add_child').cloneNode(true);</p>
<p>    newFields.id = '';<br />
    newFields.style.display = 'block';<br />
    var newField = newFields.childNodes;<br />
    for (var i=0;i&lt;newField.length;i++) {</p>
<p>        var theName = newField[i].name<br />
        if (theName)</p>
<p>                newField[i].name = theName + counter;<br />
}</p>
<p>        var insertHere = document.getElementById(&#039;child&#039;);<br />
        insertHere.parentNode.insertBefore(newFields,insertHere);</p>
<p>}</p>
<p>var compter = 0;</p>
<p>function add_member() {<br />
    compter++;</p>
<p>    var newFields = document.getElementById(&#039;add_member&#039;).cloneNode(true);<br />
    newFields.id = &#039;&#039;;<br />
    newFields.style.display = &#039;block&#039;;<br />
    var newField = newFields.childNodes;<br />
    for (var i=0;i&lt;newField.length;i++) {<br />
        var theName = newField[i].name<br />
        if (theName)<br />
                newField[i].name = theName + compter;</p>
<p>        }<br />
        var insertHere = document.getElementById(&#039;add_member&#039;);<br />
        insertHere.parentNode.insertBefore(newFields,insertHere);<br />
}</p>
<p>	Member: </p>
<p>	Member: </p>
<p>"<br />
</code><br />
`</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DaijoubuKun</title>
		<link>http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/comment-page-1/#comment-277</link>
		<dc:creator>DaijoubuKun</dc:creator>
		<pubDate>Thu, 24 Dec 2009 23:49:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=120#comment-277</guid>
		<description>Add this code inside the var for statement just before the close bracket. It&#039;s not the best solution, but it should work.

&lt;pre lang=&quot;javascript&quot;&gt;
var theName = newField[i].id
if (theName)
     newField[i].id = theName + counter;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Add this code inside the var for statement just before the close bracket. It&#8217;s not the best solution, but it should work.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> theName <span style="color: #339933;">=</span> newField<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>theName<span style="color: #009900;">&#41;</span>
     newField<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</span> <span style="color: #339933;">=</span> theName <span style="color: #339933;">+</span> counter<span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: sch</title>
		<link>http://blog.tangorangers.com/2009/05/dynamically-add-form-fields-using-javascript-and-dom-with-dynamic-post-method/comment-page-1/#comment-275</link>
		<dc:creator>sch</dc:creator>
		<pubDate>Thu, 24 Dec 2009 13:29:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tangorangers.com/?p=120#comment-275</guid>
		<description>Could you please advise how I can dynamically add a form inside which I&#039;m also able to add dyncamic fields. For e.g: I want to collect info of Members. i don&#039;t know in advance how many people. i want to have a button say: &#039;add more member&#039;. In side a member form i also want to collect info of his/her children, so i need to have a button say: &#039;add more kid&#039;. Something looks like:
-----     
Member #1:
              Name:...
              Kid#1....
              Button(Add more kid)
Button(Add more member)
------

I&#039;ve tried do something similar:
-----


      ..what displayed as default..
      
       
      
      ....
       


      ..what displayed as default..
      
       
      
      ....
       

------

I was able to generate new Member form let say Member# 2, 3, 4....But my problem is that when I click the button &#039;add more kid&#039; in side the new generated Member# 2,3,4... form the new fields are always generated in the Member#1 form. The document.getElementById(add_child) always refers to the first div not cloned one for the Member# 2,3,4.....

Could you please guide me to solve the problem.

Thanks for your help.
sch.</description>
		<content:encoded><![CDATA[<p>Could you please advise how I can dynamically add a form inside which I&#8217;m also able to add dyncamic fields. For e.g: I want to collect info of Members. i don&#8217;t know in advance how many people. i want to have a button say: &#8216;add more member&#8217;. In side a member form i also want to collect info of his/her children, so i need to have a button say: &#8216;add more kid&#8217;. Something looks like:<br />
&#8212;&#8211;<br />
Member #1:<br />
              Name:&#8230;<br />
              Kid#1&#8230;.<br />
              Button(Add more kid)<br />
Button(Add more member)<br />
&#8212;&#8212;</p>
<p>I&#8217;ve tried do something similar:<br />
&#8212;&#8211;</p>
<p>      ..what displayed as default..</p>
<p>      &#8230;.</p>
<p>      ..what displayed as default..</p>
<p>      &#8230;.</p>
<p>&#8212;&#8212;</p>
<p>I was able to generate new Member form let say Member# 2, 3, 4&#8230;.But my problem is that when I click the button &#8216;add more kid&#8217; in side the new generated Member# 2,3,4&#8230; form the new fields are always generated in the Member#1 form. The document.getElementById(add_child) always refers to the first div not cloned one for the Member# 2,3,4&#8230;..</p>
<p>Could you please guide me to solve the problem.</p>
<p>Thanks for your help.<br />
sch.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
