I have some jQuery code to add values to a Choice field (select-option) inside a InfoPath Form in a InfoPath Form Web Path. The code works fine if I run it from within the I.E. Developer Tools or FireBig inside FireFox, but the same code doesn't work when inside the Content Editor Web Part. I don’t see any JavaScript error that could indicate the problem. Has any of you experienced a similar problem?
newValues = {
'99':'Value 99'
,'100':'Value 100'
,'101':'Value 101'
,'102':'Value 102'
,'103':'Value 103'
,'104':'Value 104'
,'105':'Value 105'
};
$.each(newValues, function(key, value){
$("select[id='ctl00_m_g_f4573eb4_d2d8_4289_aa66_8e94ab38e01e_FormControl0_V1_I1_D2']").append($('<option></option>').attr('value', key).text(value));
});
_______________________________
| InfoPath Form Web Part |
--------------------------------------------------
_______________________________
| Content Editor Web Part |
--------------------------------------------------
Thanks in advance for your help,
CW