Search Results

Search found 1 results on 1 pages for 'user344666'.

Page 1/1 | 1 

  • JQuery will not set a higher scoped object in callback

    - by user344666
    Hello, I have a jquery callback function. In that function I want it to change the value of a varible that is in a higher scope, for somereason it is not doing that. Here is the code. Thanks function add() { var returnedData = { my_id: 0 }; $.post("add_event.php", { event : toSendText }, function(data) {returnedData.my_id = 5;}, "json"); if(add_page == true){ alert(returnedData.my_id); window.open('content-list.php?cal_id='); } }

    Read the article

1