Hi Jacob, the format in your 'input' is a Ruby on Rails microformat; the "name='branch[blahblah]'" is a ruby hash. The problem could be how it is being parsed on the server with your ruby code. Here is short article about the use of microformats in rails. http://wonderfullyflawed.com/2009/02/17/rails-forms-microformat/ Hope it helps. DED
2009/10/23 jacob <ygpa...@gmail.com> > > > Can you rename the control? > No I can't. Because the control's name is automatically assigned in > the rails framework. > > If I rename the control's name, it will be caused another problem I > can't properly manage the value. But I can see the value in the server > side, when I make another test controller named "<input > name="test_name" type="text" /> instead of "name=branch[blalbla]" > > I guess the server side procedure will be like this > ex) php ( even though the ruby syntax will be different, the way of > process will be same in terms of context. ) > foreach (branch as $key => $value) { > // make query according to key and value pairs > // but when I meet key name "address", I get the null value. > } > > Furthermore, I can get the whole value exactly as I typed in the web > page except the values that I set by jQuery's 'val' method. > > On 10월24일, 오전6시31분, DanDan <dan.d...@gmail.com> wrote: > > I *think* you are probably right that the name of the input control is > > your problem: > > > > name="branch[address]" > > > > I wonder if your server side code is seeing the brackets escaped or > > unescaped. > > > > Can you rename the control? > > > > On Oct 23, 9:22 am, jacob <ygpa...@gmail.com> wrote: > > > > > > > > > hello? > > > > > Today, I have met something odd experience during developing web > > > application based on Ruby on Rails and Jquery. > > > > > When I set some value by next code, > > > jQuery('#branch_address').val(address_val); > > > it seems to work as I expected. Because the value that I set by > > > jQuery's 'val' function appear on the chrome browser and other > > > browsers as well. > > > > > <input type="text" name="branch[address]" id="branch_address" /> > > > > > But when I submit the form, I got the null value from the perspective > > > of server side. > > > > > I suspect this problem could be caused by the hash array like 'brach > > > [address]' but I can't verify the reason due to lack of my knowledge > > > about jQuery and javascript. > > > > > I expect anyone who have more experience to the jQuery and javascript > > > than me give some tip or any guide to me to overcome this obstacle. > > > > > looking forward for many knowledgeable people to consider this > > > problem. > > > > > Thanks a lot. >