Hi, There could be a lot of reasons behind the inconsistent behaviour.
1.) Are these inputs being added to the DOM dynamically, i.e. at runtime ? If so have you ensured that your updating the values at the right times ? 2.) Are the fields part of the form that you submit ? At all times ? 3.) Are you sure that the variables c_chosen_id & cat_name have been updated appropriately as per your needs before you set the values of the inputs ? Thanks & Regards, Dhruva Sagar. On Wed, Nov 18, 2009 at 9:41 PM, heohni < heidi.anselstet...@consultingteam.de> wrote: > Hi, > > I have a small script which should write me into input hidden fields > some values: > > $('input[name="category_id"]').val(c_chosen_id); > $('input[name="category_name"]').val(cat_name); > > My problem now is, that it seams, the value get's written, because I > can alert it, bit it's not getting written into the source code, > because when I submit my form, I miss these values. > > The strange thing is, that it works sometimes - but not always... > Sometimes I can see the changed values wihin firebug, but sometimes, > the source isn't changing and after submitting the form, I get an > error, that these values hwere missing... > > WHat can I do? >