Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var x = {
- doSmth: function(param){
- var ret;
- $.getJSON(
- 'ajax/someAct',
- {id: param},
- function(data) {
- if (data.result == 'success') {
- ret = data.html
- };
- }
- )
- return ret;
- },
- doAnother: function(){
- var r = this.doSmth(123);
- alert(r);
- }
- };
- x.doAnother();
Add Comment
Please, Sign In to add comment