I’ve read ‘How to get dynamically created inputs from html form back to, Posted by David Johnson (Guest) on 03.06.2006 04:03’ but it doesn’t seem to work for me.
I’m using client-side javascript to add input tags to a webpage, but when I submit the page, there are no parameters created for the input fields, when it is entering the controller???
The code in the .js file:
function addBmw(){ cnt = $('bmws').select('div[id^=bmw]').size(); bmw = $F('sel_bmw').split('|'); bmw_line = '<div id="' + 'bmw' + (cnt).toString() + '">'; bmw_line += ' <img alt="delete" border="0px" src="/images/delete-icon.jpg" onclick="javascript:delBmw(' + (cnt).toString() + ')" />'; bmw_line += '<input style="position:relative;left:200px" id="event_employer_' + bmw[0] + '_xomment" name="event_employer[' + bmw[0] + '][comment]" size="60" type="text" />'; bmw_line += '<label style="position:relative;left:-380px"> ' + bmw[1] + '</label>'; bmw_line += '</div>'; Element.insert('bmws', {bottom: bmw_line}); } function delBmw(bmw_id){ Element.remove('bmw' + bmw_id) }
This works fine on the page, but no parameters received in the controller ….. Someone knows an answer? (or is it just working as designed?)
TIA, Adrie