<script type="text/javascript">
function send() {
var person = {
name: $("#id-name").val(),
address:$("#id-address").val(),
phone:$("#id-phone").val()
}
$('#target').html('sending..');
$.ajax({
url: '/test/PersonSubmit',
type: 'post',
dataType: 'json',
contentType: 'application/json',
success: function (data) {
$('#target').html(data.msg);
},
data: JSON.stringify(person)
});
}
</script>
$.post(
"test.php",
{ id: product_id, "images[]": jQuery.makeArray(image_links) },
function(data) {
var response = jQuery.parseJSON(data);
var images = response.images[0];
for (var i in images){
alert(images[i]);
}
}
);
$.post(
"test.php",
{ id: product_id, "images[]": jQuery.makeArray(image_links) },
function(data) {
var response = jQuery.parseJSON(data);
var images = response.images[0];
for (var i in images){
alert(images[i]);
}
}
);