.val(variable) Not setting a value
Hi there,
I'm fighting with this piece of code. I get result back from a PHP call and data does infact get populated. Alerting out setName show the correct value, but the next line (7) doesn't work.
Any ideas?
- function(data)
- {
- var images = data;
- var setName = images['set'][0].name;
- alert(setName);
- $('set-name').val(setName);
- });