tags:

views:

27

answers:

1

I have json array with a value that needs to be populated into an already existing input box. What syntax do I use inside my document.ready success function?

Here is my array:

{"rpt":"132","success":1,"message":"ok"}

The html in my form is:

<input type="hidden" id="rpt" value="">

My success function in the JQ script:

success: function(data)

I guess what I need is within the success function.

Thanks!

+1  A: 

I'm guessing something like:

$('#rpt').val(data['rpt']);

http://docs.jquery.com/Attributes/val

MiffTheFox
Dude, you rock!!!!!!!!! Thank you SO much!
Thank you for the link as well. I will be reading that now.