[jQuery] Problems with writing into input fields

2009-11-18 Thread heohni
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

Re: [jQuery] Problems with writing into input fields

2009-11-18 Thread Dhruva Sagar
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

Re: [jQuery] Problems with writing into input fields

2009-11-18 Thread Wil Everts
Without seeing more code it's hard to know where you're falling down... Here are a couple stabs for you: 1. Add a console.log('id: ' + c_chosen_id); and console.log('cat: ' + cat_name); into the mix and see if that's working, maybe the variables aren't always set properly... (Remember to remove