May DOM be with you:
function addboxes(n,_form) {
for (i=0;i<n;i++) {
newBox=document.createElement('input');
newBox.id='added_'+i;
// and modify/add any other properties you wish here
_form.appendChild(newBox);
}
<form onsubmit="return false">
<input type="button" value="add more boxes"
onclick="addboxes(5,this.form)">
</form>
addboxes(HOWMANYHERE, this.form); the one above adds 5
Danny
On Wed, 22 Jun 2005 09:22:44 -0700, ojvm <oj**@productosmavi.com> wrote:
thanks in advance for reading this.
i am a really ignorant about js, so i need a guru to help me.
i need to add n number of text box in a html page, the main idea is
when the user press a button apear 2 text box and if he do it again
apear 2 text box more and so on, also need that all the text boxes has
a unique id, in order to make some thing whit the values. but i dont
know how to do it. please hel me i'm trapped in this
--
Using Opera's revolutionary e-mail client:
http://www.opera.com/mail/