File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
if ((isset ($ _SERVER ['HTTP_X_REQUESTED_WITH ' ]) && $ _SERVER ['HTTP_X_REQUESTED_WITH ' ] == 'XMLHttpRequest ' )) {
4
4
//var_dump($_POST);
5
- print json_encode (array ("firstName " =>'its-true ' ));
6
-
5
+ print json_encode (array ("firstName " =>'its-true ' ));
6
+ //$json_obj = json_decode($_POST['json']);
7
+ //print $json_obj->firstName;
8
+ }else {
9
+ echo 'I got my eyes on you. ' ;
7
10
}
8
11
9
12
Original file line number Diff line number Diff line change 39
39
json : JSON . stringify ( { firstName : "Jose" , lastName : "Romaniello" } )
40
40
}
41
41
) . pipe ( function ( p ) {
42
- return "Saved " + p . firstName ;
42
+ //return "Saved " + p.firstName;
43
+ } ) ;
44
+ post . done ( function ( r ) {
45
+ alert ( r ) ;
43
46
} ) ;
44
-
45
- post . done ( function ( r ) { alert ( r ) ; } ) ;
46
47
47
48
} ) ;
48
49
</ script >
49
50
</ head >
50
51
< body >
51
- < div > jQuery Resolved</ div >
52
+ < div id ="mother-div ">
53
+ jQuery Resolved
54
+ http://joseoncode.com/2011/09/26/a-walkthrough-jquery-deferred-and-promise/
55
+ http://www.erichynds.com/jquery/using-deferreds-in-jquery/
56
+ </ div >
52
57
</ body >
53
58
</ html >
You can’t perform that action at this time.
0 commit comments