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 ?>"});
2
  • 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: jsonlint.com Commented Jul 11, 2011 at 9: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? Commented Jul 11, 2011 at 9:16

1 Answer 1

1

Maybe there your answer Serializing to JSON in jQuery

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.