Last change
on this file since 19:ab5f65372038 was 19:ab5f65372038, checked in by Borja Lopez <borja@…>, 9 years ago |
Imported latest envjasmine version, the initial import from darcs had the wrong version
|
File size:
377 bytes
|
Rev | Line | |
---|
[0] | 1 | // This is the contents of ajaxDemo.js, the file to test.
|
---|
[19] | 2 |
|
---|
| 3 | if (typeof(NS) === 'undefined' || !NS) {
|
---|
| 4 | var NS = {};
|
---|
| 5 | }
|
---|
| 6 |
|
---|
| 7 | NS.greeter = function (name) {
|
---|
| 8 | return 'Hello ' + name + '!';
|
---|
| 9 | };
|
---|
[0] | 10 |
|
---|
[19] | 11 | NS.greetUser = function (id) {
|
---|
| 12 | return $.ajax({
|
---|
| 13 | data: id,
|
---|
| 14 | url: 'name.html',
|
---|
| 15 | success: function (data) {
|
---|
| 16 | NS.greeter(data.name);
|
---|
| 17 | }
|
---|
| 18 | });
|
---|
[0] | 19 | };
|
---|
[19] | 20 |
|
---|
| 21 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.