0

I have a small doubt. I am trying to send json data to my back end page like this. But i am getting error. where in only $fb_list1 is json data. So how do i send it from here.

$('.fresh_start')
    .html("<div class='response1'><img src='/images/preloader.gif' alt='Loading.....'></img></div>")
    .load('abc.php',{product:'lcd',type:'product_display',fb_list:"<?php echo $fb_list1 ?>"});
Felix Kling
  • 795,719
  • 175
  • 1,089
  • 1,143
Hacker
  • 7,798
  • 19
  • 84
  • 154
  • Please provide WHAT error you are getting and please add some line breaks to your statement. You might want to provide the content of $fb_list1 as well. Maybe the JSON code is wrong. You can use this validator to check whether your JSON code is correct: http://jsonlint.com/ – Sebastian Wramba Jul 11 '11 at 09:15
  • Your question is not clear. `product` and `type` will just be strings. These values are available via `$_POST['product']` and `$_POST['type']`. Do you want to send the whole object as JSON? Why? – Felix Kling Jul 11 '11 at 09:16

1 Answers1

1

Maybe there your answer Serializing to JSON in jQuery

Community
  • 1
  • 1
Vyacheslav Loginov
  • 3,136
  • 5
  • 33
  • 49