webtuto Posted October 16, 2008 Share Posted October 16, 2008 hey i want to give the visitor the ability to write in a TEXT FIELD the number of TEXT FIELDS he wants to generate thanks Quote Link to comment Share on other sites More sharing options...
F1Fan Posted October 16, 2008 Share Posted October 16, 2008 JS: function setInputs(num){ var i; var div = ""; for (i=1;i<=num;i++){ div += "<input type='text' name='text[]'>"; } document.getElementById('texts').innerHTML = div; } HTML: <input type="text" onchange="setInputs(this.value);"> <div id="texts"></div> This should get you started. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.