<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>Forums Topic: Simple Javascript function to add textbox on the onclick event</title>
<link>http://www.tutorialhelpdesk.com/forum/</link>
<description>Tutorialhelpdesk programming forums</description>
<language>en</language>
<pubDate>Sat, 22 Nov 2008 00:14:32 +0000</pubDate>

<item>
<title>thdadmin on "Simple Javascript function to add textbox on the onclick event"</title>
<link>http://www.tutorialhelpdesk.com/forum/topic/simple-javascript-function-to-add-textbox-on-the-onclick-event#post-9</link>
<pubDate>Tue, 01 Jul 2008 15:29:02 +0000</pubDate>
<dc:creator>thdadmin</dc:creator>
<guid isPermaLink="false">9@http://www.tutorialhelpdesk.com/forum/</guid>
<description>&#60;p&#62;This function is very simple and might help you while creating an admin panel for example if you want to add multiple entries in a database.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function addTextbox() {
var my_div = document.getElementById(&#38;quot;tb&#38;quot;);
var tbs = &#38;#39;a&#38;#39;;
tbs += my_div.parentNode.getElementsByTagName(&#38;#39;input&#38;#39;).length;
var element=null;
try {
    element = document.createElement(&#38;quot;&#38;lt;input name=&#38;#39;&#38;quot;+tb+&#38;quot;&#38;#39; type=&#38;#39;text&#38;#39; /&#38;gt;&#38;quot;);
    }
catch (e) {
    element = document.createElement(&#38;quot;input&#38;quot;);
    element.setAttribute(&#38;quot;name&#38;quot;, tbs);
    element.setAttribute(&#38;quot;type&#38;quot;, &#38;quot;text&#38;quot;);
    }
my_div.parentNode.appendChild(element);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If you have other functions that do the same thing let me know!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
