This is starting to get on my nerves. I’m trying to set the value of text inputs on a form so I can submit it to a database. I’ve tried using .val() and re-rendering the tag completely. I use firebug to debug code, and while it shows the proper information in there, if I view the source code, the value is empty.
Example:
form code
js response
$("#labelname").attr(“value”, result.label).val(result.label);
from what I’ve read, attrib is supposed to change the value and val puts in the box. It shows on the screen, but not in the physical code. So when I go to submit it, I get a bunch of empty fields and lots of errors because of that.
Is there something i’m doing wrong here?