81
rated 0 times
[
83]
[
2]
/ answers: 1 / hits: 24568
/ 12 Years ago, wed, march 28, 2012, 12:00:00
I have this code that works well:
{livre:empty_name}
$.ajax({
url: sent.php,
type: post,
dataType: json,
data: formdata,
success: function (data) {
switch (data.livre) {
case 'empty_name':
break;
}
});
but when i try this code (i need the id), the case empty name didn't works. The option selected will be the default case:
{id:,livre:empty_name}
$.ajax({
url: sent.php,
type: post,
dataType: json,
data: formdata,
success: function (id, data) {
switch (data.livre) {
case 'empty_name':
break;
}
});
Why? and how can be solved? thanks
More From » jquery