View Single Post
Old 12-09-2007, 01:13 AM   #1 (permalink)
CMellor
The Acquainted
Upcoming Programmer 
 
CMellor's Avatar
 
Join Date: Sep 2007
Location: Leeds, UK
Posts: 141
Thanks: 6
CMellor is on a distinguished road
Default Javascript/Prototype Situation

Hey,

I've made a form, theirs a link that when clicked on, it adds another input box below the other.

javascript Code:
function addChoice() {
    new Insertion.After('choice', '<span style="display: block; padding-bottom: 5px"><label for="poll_choice">Option</label><input name="poll_choice[]" type="text" size="25" /></span>');
  }
I want it so that after ten inputs have been added, you can't add any more. Anyone any ideas on how this could be achieved?
__________________
Not quite a n00b...
CMellor is offline  
Reply With Quote