Any idea why it’s working under FF and not IE ? No errors at all under IE …
Maybe if i add the js script will help more ?
if($('addPhoneNumber') != null) {
$('addPhoneNumber').addEvent('click', function() {
htmlCode = '<tr>';
htmlCode += '<td><input type="text" name="_phone_number_new[]" size="20" class="input-phoneno" /></td>';
htmlCode += '<td><input type="text" name="_phone_ext_new[]" size="5" class="input-phone-ext" /></td>';
htmlCode += '</tr>';
table = $$('.phones');
table = table[0];
newRow = htmlToElements(htmlCode);
newRow.inject(table);
});
}
any ideas?
Forgot to add … you need to click on the + Sign to generate the HTML Code …
Solution :
In the htmlToElements function remove :
function htmlToElements(str){
return new Element('div', {html: '<table><tbody>' + str + '</tbody> </table>'}); //.getElement('tr');
}
the .getElement(‘tr’); …
Finally !!