I have page where it's possible to create number of identical rows containing some search criteria fields. I did it creating template div which is populated when user press addButton. In my js function I'm replacing then id and name with correct values and adding right order number, like 1,2,3 etc. The function works fine under FireFox, Chrome and Safari. But it fails under IE without any warning.
var $rowtp = $('div#partnerFactory-template')
.html()
.replace(/id="__prefix__/g, "id=\"truckSearcherFilter_partnerFactoryRow")
.replace(/name="__prefix__/g, "name=\"truckSearcherFilter.partnerFactoryRow");
var $nrow = $('div#partnerFactory-list').append($rowtp)
This is correct Firefox result after replaicing
<input id="truckSearcherFilter_partnerFactoryRow_0__partnerName" class="ui-corner-all ui-widget-content ui-autocomplete-input" type="text" value="" name="truckSearcherFilter.partnerFactoryRow[0].partnerName" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true">
and this is what I can see in IE
<INPUT id=__prefix___0__partnerName class="ui-corner-all ui-widget-content" type=text name=__prefix__[0].partnerName jQuery17206032578406930051="64">
Anybody can see what I'm doing wrong ?
Regards Jan