WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Adding form elements..., Guillermo, September 23, 2003
     Re:Adding form elements..., NoName, September 25, 2003
         Re:Adding form elements..., Erik Arvidsson, September 25, 2003

Subject: Re:Adding form elements... From: NoName Date: September 25, 2003

hi,

I think you can use a <input type="hidden" id="nr" name="nr" value="6">

function onButonClick() {

nr = getElementById("nr").value;

content = document.forms[yourForm].innerHTML;

for (i=nr;i<=nr+5;i++){

content += '<textarea name="txtBox' + i +'"></textarea>';

}

document.forms[yourForm].innerHTML = content;

}

the function should be on your onclick of the button.

hope you got the ideea.

From: Guillermo
Sent: September 23, 2003
Subject: Re:Adding form elements...

I have this form with 5 text boxes (named txtBox_1 ... txtBox_5). I'd like to add a button that when clicked, adds five more text boxes every time it's clicked (named txtBox_6... txtBox_n). How can I accomplish this?

 





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX