InfoPath and jQuery Code - Works on I.E. Developer Tools/FireFox FireBug but not in Content Editor Web Part - InfoPath Dev
in

InfoPath Dev

InfoPath and jQuery Code - Works on I.E. Developer Tools/FireFox FireBug but not in Content Editor Web Part

Last post 09-15-2011 04:50 PM by CWhite. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-15-2011 04:50 PM

    • CWhite
    • Not Ranked
    • Joined on 09-15-2011
    • Posts 1

    InfoPath and jQuery Code - Works on I.E. Developer Tools/FireFox FireBug but not in Content Editor Web Part

    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

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.